|
|
@ -363,18 +363,19 @@ if ($isHtml) {
|
|
|
|
$plainTextPart = rcube_mime::wordwrap($plainTextPart, $LINE_LENGTH, "\r\n", false, $message_charset);
|
|
|
|
$plainTextPart = rcube_mime::wordwrap($plainTextPart, $LINE_LENGTH, "\r\n", false, $message_charset);
|
|
|
|
$plainTextPart = wordwrap($plainTextPart, 998, "\r\n", true);
|
|
|
|
$plainTextPart = wordwrap($plainTextPart, 998, "\r\n", true);
|
|
|
|
|
|
|
|
|
|
|
|
// completely blank text part confuses some mail clients
|
|
|
|
// There's no sense to use multipart/alternative if the text/plain
|
|
|
|
if ($plainTextPart == '') {
|
|
|
|
// part would be blank. Completely blank text/plain part may confuse
|
|
|
|
$plainTextPart = "\r\n";
|
|
|
|
// some mail clients (#5283)
|
|
|
|
}
|
|
|
|
if (strlen(trim($plainTextPart)) > 0) {
|
|
|
|
|
|
|
|
// make sure all line endings are CRLF (#1486712)
|
|
|
|
// make sure all line endings are CRLF (#1486712)
|
|
|
|
$plainTextPart = preg_replace('/\r?\n/', "\r\n", $plainTextPart);
|
|
|
|
$plainTextPart = preg_replace('/\r?\n/', "\r\n", $plainTextPart);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$plugin = $RCMAIL->plugins->exec_hook('message_outgoing_body',
|
|
|
|
$plugin = $RCMAIL->plugins->exec_hook('message_outgoing_body',
|
|
|
|
array('body' => $plainTextPart, 'type' => 'alternative', 'message' => $MAIL_MIME));
|
|
|
|
array('body' => $plainTextPart, 'type' => 'alternative', 'message' => $MAIL_MIME));
|
|
|
|
|
|
|
|
|
|
|
|
$MAIL_MIME->setTXTBody($plugin['body']);
|
|
|
|
// add a plain text version of the e-mail as an alternative part.
|
|
|
|
|
|
|
|
$MAIL_MIME->setTXTBody($plugin['body']);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// look for "emoticon" images from TinyMCE and change their src paths to
|
|
|
|
// look for "emoticon" images from TinyMCE and change their src paths to
|
|
|
|
// be file paths on the server instead of URL paths.
|
|
|
|
// be file paths on the server instead of URL paths.
|
|
|
|