imclickingmaniac
imclickingmaniac

Reputation: 1563

ZF2 Mail UTF-8 & Outlook express

I am using ZF2 to send emails with UTF-8 encoding:

$message->setEncoding('UTF-8');

With such test content:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>Test</title>
    </head>
    <body bgcolor="#FFFFFF">
        ĄŚĆÓłąóźćżźęĄŚĆÓłąóźćżźęĄŚĆÓłąóźćżźę
    </body>
</html>

Everything is correct in modern browsers or email clients. Problem is that old OutlookExpress doesn't recognize this. Message is displayed with ISO. What should I do to make it read properly?

Upvotes: 1

Views: 681

Answers (2)

imclickingmaniac
imclickingmaniac

Reputation: 1563

I found solution. When sending html the part have its own encoding. Setting UTF-8 there makes OE read message correctly.

$html = new Mime\Part($text);
$html->type = Mime\Mime::TYPE_HTML;
$html->charset = 'utf-8';

Upvotes: 2

Tomor
Tomor

Reputation: 894

I guess OutlookExpress is able to show UTF8. But I experienced a situation where a client had a setting to force ISO encoding instead of detection from e-mail. So check the settings of outlookExpress.

Another thing which I would do is to send email from gmail with UTF8 encoding and read it in this OutlookExpress. - Is it showed corectly? If yes, then look on the source of the mail and check what's different from yours. If not, then problem is probably in the OutlookExpress setings.

Upvotes: 0

Related Questions