Avoid sending completely empty text parts for multipart/alternative messages (#5283)

pull/6833/head
Thomas Bruederli 8 years ago committed by Aleksander Machniak
parent fbf89913a3
commit f1d80c649e

@ -363,6 +363,11 @@ if ($isHtml) {
$plainTextPart = rcube_mime::wordwrap($plainTextPart, $LINE_LENGTH, "\r\n", false, $message_charset);
$plainTextPart = wordwrap($plainTextPart, 998, "\r\n", true);
// completely blank text part confuses some mail clients
if ($plainTextPart == '') {
$plainTextPart = "\r\n";
}
// make sure all line endings are CRLF (#1486712)
$plainTextPart = preg_replace('/\r?\n/', "\r\n", $plainTextPart);

Loading…
Cancel
Save