diff --git a/includes/mail.inc b/includes/mail.inc index 3d6bf659ad7f2cda734c88877b018997cf3c1b27..3f943652bb6bb9cb03519aafa186b7daab4cf5ff 100644 --- a/includes/mail.inc +++ b/includes/mail.inc @@ -184,12 +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 - // for the message body. + // Note: e-mail uses CRLF for line-endings, but PHP's API requires LF. // They will appear correctly in the actual e-mail that is sent. str_replace("\r", '', $message['body']), - // For headers, PHP's API requires that we use CRLF normally. - join("\r\n", $mimeheaders) + // For headers, PHP's API suggests that we use CRLF normally, + // but some MTAs incorrecly replace LF with CRLF. See #234403. + join("\n", $mimeheaders) ); } }