后缀- Html电子邮件包含随机字符


Postfix - Html emails contain random characters

我将postfix的邮件存储到mysql中。

我注意到一些邮件中出现了一些奇怪的字符,而其他邮件中没有。所以,这是随机的。

我看到的是:

--1001534069-1142425087-1366837456=:47630
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
=0A=0AConfirmation: We received your membership (one-year) p=
ayment  =0A=0A   =0A =0A =0A  =0A =0A =0A =0A=0A Confirmation:: We received =
your membership (one-year) payment=0AHi John Smith,=0AWe re=
............

--1001534069-1142425087-1366837456=:47630
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
<html><body><div style=3D"color:#000; background-color:#fff; font-family:ti=
mes new roman, new york, times, serif;font-size:12pt"><div><br></div><div s=
tyle=3D"font-family: 'times new roman', 'new york', times, serif; font-size=
: 12pt;"><div style=3D"font-family: 'times new roman', 'new york', times, s=
erif; font-size: 12pt;"><div class=3D"y_msg_container"><div id=3D"yiv684532=
7653"><div>=0A    <div class=3D"yiv6845327653moz-forward-container">=0A    =
  =0A      <title>Confirmation: We received your membership=
............................

我包含了两种内容类型,奇怪的字符相当明显。我将每封电子邮件保存为一个列类型:text,排序:utf8_unicode_ci

对于那些对我使用什么来提取后缀邮件感兴趣的人,我使用PHP imap_*函数。

不管怎样,有人知道为什么这些奇怪的字符会被插入吗?(而其他邮件有完美的HTML或纯文本?)

这是加引号的可打印编码。您需要撤销content-transfer-encoding,它可能被引用为printable或base64。