Question

I am building a system to send bulk emails. So far, while sending emails one by one I achieve success with all the mail services i tried (microsoft exchange, gmail, yahoo) but one, hotmail.

When i send the email through any service (the 3 in parenthesis in the previous text block) the sender name looks like :

Système automatisé de l'École de langues de l'Université Laval

but in hotmail i get an output looking like :

=?8bit?Q?Syst=C3=A8me_automatis=C3=A9?= de =?8bit?Q?l=27=C3=89cole?= de langues de =?8bit?Q?l=27Universit=C3=A9?= Laval"

And over that I can't open the email.

For more input here is the header as received by hotmail

X-Message-Delivery: Vj0xLjE7dXM9MDtsPTA7YT0xO0Q9MTtTQ0w9MA==
X-Message-Status: n
X-SID-PRA: =?8bit?Q?Syst=C3=A8me_automatis=C3=A9?= de =?8bit?Q?l=27=C3=89cole?= de langues de =?8bit?Q?l=27Universit=C3=A9?= Laval <elulnoreply@elul.ulaval.ca>
X-AUTH-Result: NONE
X-Message-Info: JGTYoYF78jE7aK1HQZaqWIRunRfMfh0RYwMH1I+TP7tPRAKNtqkSXOBYZEFyjTXXcgHIqT9rVaWhceALG7uqHpX/Pl1pQfak+BqRLhvdGCY=
Received: from server.com ([###.###.###.###]) by snt0-mc2-f38.Snt0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675);
     Tue, 9 Nov 2010 10:13:43 -0800
Received: from otherServer.com ([###.###.###.###])
  by server.com with ESMTP; 09 Nov 2010 13:13:42 -0500
Received: from aServer.com (###.###.###.###) by otherServer.com
 (###.###.###.###) with Microsoft SMTP Server id 8.2.176.0; Tue, 9 Nov 2010
 13:13:42 -0500
Message-ID: <1289326422.4cd98f56259d8@gestion.local>
Date: Tue, 9 Nov 2010 13:13:42 -0500
Subject: Convocation au test de classement pour la session d'hiver 2011
From: "=?8bit?Q?Syst=C3=A8me_automatis=C3=A9?= de =?8bit?Q?l=27=C3=89cole?=
 de langues de =?8bit?Q?l=27Universit=C3=A9?= Laval"
    <******@******.***>
To: <******@hotmail.com>
MIME-Version: 1.0
Content-Type: multipart/alternative;
    boundary="_=_swift_v4_12893264224cd98f5629b03_=_"
Return-Path: ******@******.***
X-OriginalArrivalTime: 09 Nov 2010 18:13:43.0330 (UTC) FILETIME=[D7DD8020:01CB8039]
--_=_swift_v4_12893264224cd98f5629b03_=_ 
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

Email and server address have been obfuscated.

This problem started when I changed the charset to UTF-8 which I must use to have accented chars supported.

EDIT :

Finally I choose to drop the french chars in the FromName part and normalized everything with standard chars as é is now e and so forth.

Was it helpful?

Solution

Try to encode your headers (FromName, Subject, etc.) like this :

"=?utf-8?B?" . base64_encode($string) . "?="

Based on RFC 1342 and 2047 :

Answer adapted from StackOverflow : PHP Mail: Sending ÅÄÖ characters?

and this blog : http://snook.ca/archives/servers/encoding_accent

OTHER TIPS

Have you considered sending the emails as HTML instead? It has been a while since I did PHP but the function should be HTMLEntities

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top