Skip to content

Commit

Permalink
[PATCH] Remove extra space in email headers
Browse files Browse the repository at this point in the history
With this extra space, the malformed Cc or Bcc header was considered as the
first line of the body of the email, a new line was inserted before it. This
new line was preventing the following headers (including Content-Type) to be
interpreted as headers and the HTML email was displayed in plain text.
(text by ricola)

Reported by Josu in (https://lists.riseup.net/www/info/aixada-dev)[Aixada-Dev] and tested by ricola.

Please merge, thanks.
  • Loading branch information
jorix committed Nov 27, 2015
1 parent 0264799 commit acddc0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions php/utilities/general.php
Expand Up @@ -390,8 +390,8 @@ function send_mail($to, $subject, $bodyHTML, $options=null) {
'From: '.$from."\r\n".
'Reply-To: '.
(isset($options['reply_to']) ? $options['reply_to'] : $from)."\r\n".
(isset($options['cc']) ? 'Cc :'.$options['cc']."\r\n" : '').
(isset($options['bcc']) ? 'Bcc :'.$options['bcc']."\r\n" : '').
(isset($options['cc']) ? 'Cc:'.$options['cc']."\r\n" : '').
(isset($options['bcc']) ? 'Bcc:'.$options['bcc']."\r\n" : '').
'Return-Path: '.$from."\r\n".
"X-Mailer: PHP\r\n".
"MIME-Version: 1.0\r\n".
Expand Down

0 comments on commit acddc0e

Please sign in to comment.