From 1f369a1933a0ce7032c131a32f4dc55e0b3b898c Mon Sep 17 00:00:00 2001 From: Bob Vincent Date: Sat, 12 Mar 2011 02:37:42 -0500 Subject: [PATCH] Strip linefeeds from subject. --- modules/system/system.mail.inc | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/modules/system/system.mail.inc b/modules/system/system.mail.inc index ef50642..93756d1 100644 --- a/modules/system/system.mail.inc +++ b/modules/system/system.mail.inc @@ -56,7 +56,9 @@ class DefaultMailSystem implements MailSystemInterface { } $line_endings = variable_get('mail_line_endings', MAIL_LINE_ENDINGS); // Prepare mail commands. - $mail_subject = mime_header_encode($message['subject']); + // The email might not be sent properly if the subject line contains + // newline characters. + $mail_subject = str_replace("\n", ' ', mime_header_encode($message['subject'])); // Note: e-mail uses CRLF for line-endings. PHP's API requires LF // on Unix and CRLF on Windows. Drupal automatically guesses the // line-ending format appropriate for your system. If you need to -- 1.7.1