-
Notifications
You must be signed in to change notification settings - Fork 510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Outgoing emails corrupt / garbled #1670
Comments
The same issue occurs on emails sent using the "Sent Test" button in Manage -> Settings -> Mail Settings under "System Emails". |
I added some logging of the |
Strange. You seem to be the only one experiencing this issue. |
If you do a |
|
What sending method are you using:
|
In the settings, I had chosen to use PHP's mail() function (which was why I then searched the source for I've now added code in |
We've checked. With "PHP's mail() function" as the sending method headers are separated with
Can you send an email to Gmail and check? |
As per original message, PHP is 8.0.15, and the corrupt headers are the same in every mail client (Thunderbird, Alpine and Roundcube being mentioned), since they are corrupt in the mail in the inbox. Here it is in GMail, with the headers concatenated as per the email RFC (headers beginning with a space are taken as a continuation of the current header): Resulting in corrupt display: Operating system is CentOS 7.9 (fully updated). |
It's hard to tell why it happens for you and does not happen for others. It can be system or PHP configuration issue. |
Try to downgrade PHP to 7.4 or upgrade to 8.1 |
Interestingly, it works in PHP 7.4 (version 7.4.28). I have not tried PHP 8.1. The mail configuration in both is identical; the only uncommented lines in the configuration relating to mail are:
It looks likely that this is related - a change made in PHP 8 only: https://bugs.php.net/bug.php?id=47983 |
Works fine in PHP 8.1. It must be PHP 8.0.x issue. |
Further investigation confirms that in PHP 8.0, if you supply a string to the |
Having the same issue with PHP 8.2 and 8.3. It messed up the password reset link so I had to manually edit the database to get admin access. Only then could I change it away from PHP sendmail |
We're running a test install (Freescout 1.7.30, PHP 8.0.15). Outgoing mails from Freescout (both customer replies, and other system emails, e.g. user invite email) are corrupt, resulting in being wrongly displayed in a variety of email clients.
Here is the raw source of a mail sent by Freescout (a reply to a test customer), as shown by Thunderbird's "Show source" feature:
test.txt
You will notice that some of the headers have unwanted preceding spaces, causing them to be treated as part of the preceding header and effectively ignored.
The same corruption is seen in the headers when the mail is collected instead in Alpine, and in Roundcube webmail, so is clearly occurring at source (i.e. not introduced by the email user agent).
The mailserver (Exim, latest version) handles outgoing email for a over 200 other hosted websites, without any similar issues seen
The top of the mail in Thunderbird looks much like you might expect, given that the headers don't correctly set up the MIME encoding:
The text was updated successfully, but these errors were encountered: