我一直在使用 Mailkit 库来接收电子邮件,到目前为止它一直很棒。但是,我们发现通过 Mac 上的邮件应用程序发送的消息存在问题。例如,我们发送的带有 pdf 附件和 html 格式正文的消息被作为没有任何附件的对象接收(通过 IMailFolder.GetMessage),并且只有 HtmlBody 为空(仅接收 TextBody)
我正在从网络电子邮件客户端附上这封邮件的源代码(没有一些个人信息标题)(邮件在那里显示正常)
Content-Type: multipart/alternative; boundary="Apple-Mail=_CA0BDF81-AE2A-4E1A-9D37-8B30B5220C77"
Subject: Test
Date: Thu, 11 Jun 2015 07:00:29 -0700
Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\))
X-Mailer: Apple Mail (2.1990.1)
--Apple-Mail=_CA0BDF81-AE2A-4E1A-9D37-8B30B5220C77
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=us-ascii
Hello goodbye pdf
--Apple-Mail=_CA0BDF81-AE2A-4E1A-9D37-8B30B5220C77
Content-Type: multipart/mixed;
boundary="Apple-Mail=_FA44F8C6-5F68-44EF-9537-8E8651DAAC0C"
--Apple-Mail=_FA44F8C6-5F68-44EF-9537-8E8651DAAC0C
Content-Transfer-Encoding: 7bit
Content-Type: text/html;
charset=us-ascii
<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word;
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div><div class=""><b class=""><i class="">Hello</i></b></div><div class=""><b class=""><i class="">goodbye pdf</i></b></div></body></html>
--Apple-Mail=_FA44F8C6-5F68-44EF-9537-8E8651DAAC0C
Content-Disposition: inline;
filename*=utf-8''Zamo%CC%81wienie%20ZAM21%2D150528%2D01.pdf
Content-Type: application/pdf;
x-unix-mode=0644;
name="=?utf-8?Q?Zamo=CC=81wienie_ZAM21-150528-01=2Epdf?="
Content-Transfer-Encoding: base64
(here is a base64-encoded pdf that is being decoded correctly)
--Apple-Mail=_FA44F8C6-5F68-44EF-9537-8E8651DAAC0C
Content-Transfer-Encoding: 7bit
Content-Type: text/html;
charset=us-ascii
<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word;
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""></body></html>
--Apple-Mail=_FA44F8C6-5F68-44EF-9537-8E8651DAAC0C--
--Apple-Mail=_CA0BDF81-AE2A-4E1A-9D37-8B30B5220C77--
有没有人遇到过Mailkit的这种问题?或者它可能不依赖于库,只是特定的苹果邮件?