Aug 19th, 2015, 2:17 AM
I had facing similar issue after upgrading to PHP 5.5.26.
You'll find more information on http://stackoverflow.com/questions/30887...nal-header, but in a nutshell:
* since PHP 5.5.26 mail function does not accept message (i.e. mail body) in headers anymore.
* Mail body has to to be provided as mail $message parameter , even if multipart.
It has been fixed with the following code. Edit global/code/emails.php :
Hope it helps !
Alexandre 8)
You'll find more information on http://stackoverflow.com/questions/30887...nal-header, but in a nutshell:
* since PHP 5.5.26 mail function does not accept message (i.e. mail body) in headers anymore.
* Mail body has to to be provided as mail $message parameter , even if multipart.
It has been fixed with the following code. Edit global/code/emails.php :
Code:
Index: emails.php
===================================================================
--- emails.php (revision 3253)
+++ emails.php (working copy)
@@ -319,8 +319,16 @@
// stores the content for either text or HTML emails (but not both!)
$message = "";
- if (!empty($email_info["html_content"]) && !empty($email_info["text_content"]))
- $headers .= _ft_get_multipart_message($email_info["html_content"], $email_info["text_content"], $eol);
+ if (!empty($email_info["html_content"]) && !empty($email_info["text_content"])) {
+ // Since PHP 5.5.25, mail body can't be put in message headers anymore.
+ // So it is put in the mail parameter $message, even if it's multipart.
+ $multipart_message = _ft_get_multipart_message($email_info["html_content"], $email_info["text_content"], $eol);
+ // Get first line corresponding to the content-type and defining the boundary, and add it to the headers.
+ $tok = strtok($multipart_message, $eol);
+ $headers .= $tok . $eol;
+ // Then get the mail body (multipart encoded) and add it to the message.
+ $message = preg_replace('~' . $tok . $eol . '~i', '', $multipart_message);
+ }
else if (!empty($email_info["text_content"]))
{
$headers .= "Content-type: text/plain; charset=UTF-8";
Hope it helps !
Alexandre 8)