带有法语字符的 Swift 邮件发送者姓名

发布于 2024-10-02 00:20:29 字数 2440 浏览 9 评论 0原文

我正在构建一个发送批量电子邮件的系统。到目前为止,在一封一封地发送电子邮件时,我尝试过的所有邮件服务(微软交换、gmail、雅虎)都取得了成功,但只有一个是 hotmail。

当我通过任何服务(上一个文本块中括号中的 3)发送电子邮件时,发件人名称如下所示:

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

但在 hotmail 中,我得到的输出如下所示:

=?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"

除此之外,我无法打开电子邮件。

如需更多输入,请参阅 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 <[email protected]>
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: <[email protected]>
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

电子邮件和服务器地址已被混淆。

当我将字符集更改为 UTF-8 时,这个问题开始出现,我必须使用 UTF-8 来支持重音字符。

编辑:

最后我选择删除 FromName 部分中的法语字符,并使用标准字符标准化所有内容,因为 é 现在是 e 等等。

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 <[email protected]>
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: <[email protected]>
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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

好听的两个字的网名 2024-10-09 00:20:30

尝试像这样编码您的标头(FromName、Subject 等):

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

基于 RFC 1342 和 2047 :

答案改编自 StackOverflow : PHP Mail :发送 ÅäÖ 字符?

和此博客:http://snook.ca/archives/servers /encoding_accent

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

樱娆 2024-10-09 00:20:30

您是否考虑过以 HTML 格式发送电子邮件?我已经有一段时间没有使用 PHP 了,但是函数应该是 HTMLEntities

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文