Skip to content

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

Open
hamdouni wants to merge 3 commits intoCampbellSoftwareSolutions:masterfrom
hamdouni:master
Open

Fix iconv bug (empty body when mail encoded in quoted-printable)#86
hamdouni wants to merge 3 commits intoCampbellSoftwareSolutions:masterfrom
hamdouni:master

Conversation

@hamdouni
Copy link
Copy Markdown

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: support@osticket.com
Subject: Testing
From: Peter Rotich <peter@osticket.com>
To: support@osticket.com
Content-Type: text/plain; charset=ISO-8859-1

Testing testing.

mail.bad:

Date: Thu, 7 Feb 2013 11:01:04 -0600
Delivered-To: support@osticket.com
Subject: Testing
From: Peter Rotich <peter@osticket.com>
To: support@osticket.com
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
Copy Markdown

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