1.0.8.12 Questions / Comments / Concerns

Ask the community for help and support.
cut-n-paste
Posts: 21
Joined: Fri Oct 07, 2022 12:20 pm
Has thanked: 2 times
Been thanked: 5 times

Re: 1.0.8.12 Questions / Comments / Concerns

Post by cut-n-paste »

BPickle wrote: Fri Mar 11, 2022 1:09 am This may not be the right place to post this one.

PHP 8 may have changed its mail() function a little, such that Phoenix running on Linux garbles the emails by adding a space in front of the Content-type and From headers. This is because if the headers are only separated by a LF, then mail() probably adds CRLF to the existing LF, making there be one more white space character between the headers than there should be.

Changing

Code: Select all

return mail($to, $this->ensure_encoding($subject), $this->output, implode($this->lf,, $headers), "-f$from_addr");
in includes/system/versioned/1.0.8.5/email.php to

Code: Select all

return mail($to, $this->ensure_encoding($subject), $this->output, implode("\r\n", $headers), "-f$from_addr");
fixes it. But maybe that might mess up Phoenix running on Windows. Perhaps the headers should be passed as an array with the name of each header as the key for the value being passed.
I have run into this problem in CE Phoenix 1.0.8.17 after a forced upgrade to PHP 8.0.24 by our ISP. I was able to get around the problem by setting "E-Mail Linefeeds"
to CRLF in email options in the admin control panel.

Tags:
Post Reply