Skip to content
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

Fix iconv bug (empty body when mail encoded in quoted-printable) #86

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

hamdouni
Copy link

Hi !

I had some issue with emails resulting in empty ticket. I narrowed the problem to this state :

  • if the body containes any accentued character (é or à for example)
  • if the email has this in his header : "Content-Transfer-Encoding: quoted-printable"

Here are 2 samples of complete email.
The first one "mail.good" works nicely.
The second "mail.bad" gives an empty ticket.

mail.good:

Date: Thu, 7 Feb 2013 11:01:04 -0600
Delivered-To: [email protected]
Subject: Testing
From: Peter Rotich <[email protected]>
To: [email protected]
Content-Type: text/plain; charset=ISO-8859-1

Testing testing.

mail.bad:

Date: Thu, 7 Feb 2013 11:01:04 -0600
Delivered-To: [email protected]
Subject: Testing
From: Peter Rotich <[email protected]>
To: [email protected]
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Testing testing =E9 

The difference is "Content-Transfer-Encoding: quoted-printable" in the header and =E9 (encoded é) inside the email body.

To test them inside a container, I use the internal mail piping as :

php -q /data/upload/api/pipe.php < mail.good

To fix that, I used this fix and it's now OK for the 2 samples.

Hope it helps.

Netzvamp added a commit to Netzvamp/docker-osticket that referenced this pull request Nov 16, 2020
@Netzvamp
Copy link

Netzvamp commented Nov 16, 2020

Hey, i've implemented your fix in my repo/pull request (https://github.com/Netzvamp/docker-osticket) . I had to change the URL to the CDN (as in docker-library/php#240 (comment) ) and put it in one line with the other RUNs for less layers. My tests where fine, so thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants