From 637ec9359cb3ef8e5e16008b800d5633c4fe7890 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 15 Mar 2008 11:59:37 +0000 Subject: - Patch #234403 by alienbrain: drupal_mail_send() should use CRLFs instead of LFs in e-mail headers. --- includes/mail.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'includes/mail.inc') diff --git a/includes/mail.inc b/includes/mail.inc index 64b9b9363..3d6bf659a 100644 --- a/includes/mail.inc +++ b/includes/mail.inc @@ -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) ); } } -- cgit v1.2.3