Commit 637ec935 authored by Dries's avatar Dries

- Patch #234403 by alienbrain: drupal_mail_send() should use CRLFs instead of...

- Patch #234403 by alienbrain: drupal_mail_send() should use CRLFs instead of LFs in e-mail headers.
parent 66c79ee7
......@@ -184,10 +184,12 @@ function drupal_mail_send($message) {
return mail(
$message['to'],
mime_header_encode($message['subject']),
// Note: e-mail uses CRLF for line-endings, but PHP's API requires LF.
// Note: e-mail uses CRLF for line-endings, but PHP's API requires LF
// for the message body.
// They will appear correctly in the actual e-mail that is sent.
str_replace("\r", '', $message['body']),
join("\n", $mimeheaders)
// For headers, PHP's API requires that we use CRLF normally.
join("\r\n", $mimeheaders)
);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment