On my BB10 device I am getting plain-text CONVERTED bodies (basically HTML with the tags streipped) instead of HTML when the sender is a BlackBerry device -- which unless told otherwise will send ONLY HTML email (no plain text at all.)
I see where the conversion is happening as if "$plainBody" is null it gets converted, but I do not understand why $bpReturnType is SYNC_BODYPREFERENCE_PLAIN in that instance. Is this a function of a bad parameter being stored for the device somewhere?
I see where GetBodyPreferenceBestMatch should theoretically return HTML in preference to PLAIN, but it doesn't -- and as a result I get converted HTML if there is no plain text (which is invariably real ugly!)
In backend/imap/imap.php....
$htmlBody = str_replace("\n","\r\n", str_replace("\r","",$htmlBody));
$plainBody = str_replace("\n","\r\n", str_replace("\r","",$plainBody));
// KD 2015-06-11 If we have HTML in the main body, use it.
//
if ($htmlbody !== "")
$bpReturnType = SYNC_BODYPREFERENCE_HTML;
if (Request::GetProtocolVersion() >= 12.0) {
$output->asbody = new SyncBaseBody();
On my BB10 device I am getting plain-text CONVERTED bodies (basically HTML with the tags streipped) instead of HTML when the sender is a BlackBerry device -- which unless told otherwise will send ONLY HTML email (no plain text at all.)
I see where the conversion is happening as if "$plainBody" is null it gets converted, but I do not understand why $bpReturnType is SYNC_BODYPREFERENCE_PLAIN in that instance. Is this a function of a bad parameter being stored for the device somewhere?
I see where GetBodyPreferenceBestMatch should theoretically return HTML in preference to PLAIN, but it doesn't -- and as a result I get converted HTML if there is no plain text (which is invariably real ugly!)
In backend/imap/imap.php....