I have a 4.6.3 Drupal site with UTF-8 encoding with Mass Mailer and there is a problem when you try to send mails with characters like €, accents, and so. The mail arrives with a "Content-Type: text/plain;charset="iso-8859-1"" header and so the non-standard characters are corrupted.

I have tried changing all the references to the ISO-8859-1 encoding in all PHPList files where there is one to UTF-8 (as Mass Mailer doesn't have any reference) but the mail keeps arriving with the Content-Type: text/plain;charset="iso-8859-1" header.

Any hint how to solve this?

Comments

killes@www.drop.org’s picture

I can confirm this problem. investigating a solution.

eldarin’s picture

Does email support more than iso-8859-1 et al, and other charsets need base64 encoding, or have I just the old RFCs in mind ? I remember all the trouble with iso-8859-1 subject-lines etc in the old days, and clean 8-bit support.
;-)

killes@www.drop.org’s picture

there are two different issues here: header fields (which need to be encoded) and the body. Sending utf-8 is fine nowadays.

eldarin’s picture

Ok, could it be:
Content-Transfer-Encoding: quoted-printable
?

I.e does it have those =E5 etc encodings ?

killes@www.drop.org’s picture

You don't need QP nowadays either, 8bit should be just fine.

Ok, my findings are as follows:

1) I hate phplist, it is a collection of evil hacks.
2) You can get phplist to send mails in 8bit by setting define('TEXTEMAIL_ENCODING','8bit');
in config.php
3) you can get phplist to send mails with content type text/plain and charset utf-8 by changing the appropriate values in the database:

update phplist_config set value = 'UTF-8' where item = 'html_charset';
update phplist_config set value = 'UTF-8' where item = 'text_charset';

After doing that, your mails will nto have a body anylonger, though...

Also, headers do not seem to get encoded. I will resort to encoding the subject before sending.

killes@www.drop.org’s picture

Version: 4.6.x-1.x-dev »

I've committed a patch that deals with the subject header. Subjects can now contain umlauts etc.

Now I need to find why phplist stops sending the body when you switch encoding to 8 bit. might be just the current host, but I don't think so...

killes@www.drop.org’s picture

phplist (at least of as version 2.10.1) has two mail backends. One is the traditional phplist mail interface the other one is phpmailer. For whatever reason, phpmailer can send properly encoded mails. This is enough fix for me.

killes@www.drop.org’s picture

Status: Active » Fixed

Ok, I patches the .mysql file too. shoudl work now. People who want to try this on 4.6 need to get phplist 2.10.2, the new config.php and change the db as indicated in phplist.mysql.

Anonymous’s picture

Status: Fixed » Closed (fixed)