use CRLF for all email headers

This commit is contained in:
zotlabs 2019-03-16 13:44:43 -07:00
parent 21fee2862a
commit fe89b8d137
2 changed files with 13 additions and 13 deletions

View file

@ -758,9 +758,9 @@ class Enotify {
// generate a multipart/alternative message header
$messageHeader =
$params['additionalMailHeader'] .
"From: $fromName <{$params['fromEmail']}>\n" .
"Reply-To: $fromName <{$params['replyTo']}>\n" .
"MIME-Version: 1.0\n" .
"From: $fromName <{$params['fromEmail']}>\r\n" .
"Reply-To: $fromName <{$params['replyTo']}>\r\n" .
"MIME-Version: 1.0\r\n" .
"Content-Type: multipart/alternative; boundary=\"{$mimeBoundary}\"";
// assemble the final multipart message body with the text and html types included
@ -768,14 +768,14 @@ class Enotify {
$htmlBody = chunk_split(base64_encode($params['htmlVersion']));
$multipartMessageBody =
"--" . $mimeBoundary . "\n" . // plain text section
"Content-Type: text/plain; charset=UTF-8\n" .
"Content-Transfer-Encoding: base64\n\n" .
$textBody . "\n" .
"--" . $mimeBoundary . "\n" . // text/html section
"Content-Type: text/html; charset=UTF-8\n" .
"Content-Transfer-Encoding: base64\n\n" .
$htmlBody . "\n" .
"--" . $mimeBoundary . "\r\n" . // plain text section
"Content-Type: text/plain; charset=UTF-8\r\n" .
"Content-Transfer-Encoding: base64\r\n\r\n" .
$textBody . "\r\n" .
"--" . $mimeBoundary . "\r\n" . // text/html section
"Content-Type: text/html; charset=UTF-8\r\n" .
"Content-Transfer-Encoding: base64\r\n\r\n" .
$htmlBody . "\r\n" .
"--" . $mimeBoundary . "--\n"; // message ending
// send the message

View file

@ -2010,8 +2010,8 @@ function z_mail($params) {
$messageHeader =
$params['additionalMailHeader'] .
"From: $fromName <{$params['fromEmail']}>\n" .
"Reply-To: $fromName <{$params['replyTo']}>\n" .
"From: $fromName <{$params['fromEmail']}>\r\n" .
"Reply-To: $fromName <{$params['replyTo']}>\r\n" .
"Content-Type: text/plain; charset=UTF-8";
// send the message