Re: [PHP] Re: Mail subject encoding breaks
Hello, on 05/11/2009 12:25 PM Thodoris said the following: This script seems to work ok in a freebsd development server I have but a linux production machine breaks the subject's encoding for some unexpected reason. The subject has a mix of English and Greek characters that FreeBSD seems to handle like a charm. Both machines have the same php version (5.2.9) and the scripts encoding is UTF-8. Iconv and mbstring are configured the same way in php.ini (although I am not aware whether phpmailer uses iconv or mbstring). Has anyone had a similar experience? Is it possible that sendmail (which is the underlying tool) breaks the mail encoding? I am not sure what you mean by breaking the mail encoding. I use the MIME message class and it works perfectly with any encoding, even multibyte character sets. Take a look at the examples test_email_message and test_multibyte_message.php . http://www.phpclasses.org/mimemessage I am not sure what is happening exactly but I think that for some reason the subject of the e-mail includes more than one encoding while using linux. The English part is encoded in ISO-8859-1 and the Greek part into something that I can't detect (probably because thunderbird doesn't support all encodings). The body of the message is UTF-8 as expected. I didn't try the suggested solution since I have solved this, but the original question was about phpmailer. I will give it a try however because it seems like a better solution and more robust than mail_utf8. -- Thodoris
[PHP] Re: Mail subject encoding breaks
Hello, on 05/11/2009 12:25 PM Thodoris said the following: This script seems to work ok in a freebsd development server I have but a linux production machine breaks the subject's encoding for some unexpected reason. The subject has a mix of English and Greek characters that FreeBSD seems to handle like a charm. Both machines have the same php version (5.2.9) and the scripts encoding is UTF-8. Iconv and mbstring are configured the same way in php.ini (although I am not aware whether phpmailer uses iconv or mbstring). Has anyone had a similar experience? Is it possible that sendmail (which is the underlying tool) breaks the mail encoding? I am not sure what you mean by breaking the mail encoding. I use the MIME message class and it works perfectly with any encoding, even multibyte character sets. Take a look at the examples test_email_message and test_multibyte_message.php . http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos Find and post PHP jobs http://www.phpclasses.org/jobs/ PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php