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

pull/5754/head
Thomas Bruederli 8 years ago committed by Aleksander Machniak
parent 412982aa06
commit 334b339bfe

@ -388,6 +388,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