be more detailed on send errors; handle ContentType for smart forward when content type of message is text/html and of forwarded message content is text/plain

This commit is contained in:
Klaus Leithoff 2011-10-19 14:14:40 +00:00
parent b61eee73eb
commit fb78a775a0

View File

@ -574,7 +574,8 @@ class felamimail_activesync implements activesync_plugin_write, activesync_plugi
} else {
// plain text Message
if ($this->debugLevel>0) debugLog("MIME Body".' Type:plain, fetch text:');
$mailObject->IsHTML(false);
// as we glue together the send mail part, and the smartforward part, we stick to the ContentType of the to be sent-Mail
$mailObject->IsHTML($mailObject->ContentType=='text/html');
$bodyStruct = $this->mail->getMessageBody($uid,'never_display');//'never_display');
$bodyBUFF = $this->mail->getdisplayableBody($this->mail,$bodyStruct);//$this->ui->getdisplayableBody($bodyStruct,false);
@ -694,7 +695,16 @@ class felamimail_activesync implements activesync_plugin_write, activesync_plugi
$mailObject->Send();
}
catch(phpmailerException $e) {
debugLog("The email could not be sent. Last-SMTP-error: ". $e->getMessage());
debugLog("The email could not be sent. Last-SMTP-error: ". $e->getMessage());
debugLog("IMAP-SendMail: MailObject (short):".array2string(array('host'=>$mailObject->Host,
'port'=>$mailObject->Port,
'username'=>$mailObject->Username,
'subject'=>$mailObject->Subject,
'CharSet'=>$mailObject->CharSet,
'Priority'=>$mailObject->Priority,
'Encoding'=>$mailObject->Encoding,
'ContentType'=>$mailObject->ContentType,
)));
$send = false;
}