For anyone using Release 29 or earlier, you will likely be affected by an issue I discovered yesterday while beta-testing Release 30.
For my WM 6.5 handset - Emails with either a high or low priority on the server always appear with a low priority on the handset. (Seems like the logic used on WM is - if Importance Flag is set then { if Importance Flag = "2" then High Priority ELSE Low Priority } else Priority = Normal. Thus all emails with "High"/"Low" come across as being low priority)
For my Nokia handset - Emails with an importance Flag - either High Priority or Low Priority - do not display at all on the handset. The server thinks it has pushed them across - but they never show - and they don't re-push. (Seems like the logic here is - if the importance Flag is set to an invalid value - discard the message)
The problem is in the Function GetFlags (starts at line 2226 in Release 29)
Code:
private function GetFlags($flags) {
$flag = array();
$flag["unread"] = 0;
$flag["priority"] = null;
$strlen = strlen($flags);
for ($i=0;$i<$strlen;$i++) {
$char = substr(strtolower($flags),$i,1);
switch ($char) {
case 'u':
$flag["unread"] = 1; break;
case '!':
$flag["priority"] = "High"; break;
case '?':
$flag["priority"] = "Low"; break;
}
}
return $flag;
}
The ActiveSync protocol document states that the priority flags should have values "1" for Normal (default assumed if no flag present), "0" for Low - or "2" for High.
To fix the issue, simple replace the values in the function. It should look like this
Code:
private function GetFlags($flags) {
$flag = array();
$flag["unread"] = 0;
$flag["priority"] = null;
$strlen = strlen($flags);
for ($i=0;$i<$strlen;$i++) {
$char = substr(strtolower($flags),$i,1);
switch ($char) {
case 'u':
$flag["unread"] = 1; break;
case '!':
$flag["priority"] = "2"; break;
case '?':
$flag["priority"] = "0"; break;
}
}
return $flag;
} Cheers