我发现了一个ImapProtocolException一条消息:Mailkit取“意外令牌IMAP响应:QString的:‘多部分消息’]”
"Unexpected token in IMAP response: [qstring: "Multipart message"]" when issuing zInbox.Fetch(uids, MailKit.MessageSummaryItems.UniqueId Or MailKit.MessageSummaryItems.BodyStructure Or MailKit.MessageSummaryItems.Envelope)
但在另一方面,如果我用的GetMessage (uids)一切顺利,没有错误。
这里是ProtocolLogger从取(你可以看到不获取完成消息):
C: A00000790 UID FETCH 97824 (UID ENVELOPE BODYSTRUCTURE)
S: * 24320 FETCH (UID 97824 ENVELOPE ("Mon, 26 Oct 2015 16:48:44 +0000" "NFe" ((NIL NIL "fatsc" "makrocentral.com.br")) NIL NIL ((NIL NIL "fiscal" "generale.ind.br")) NIL NIL NIL "<[email protected]>") BODYSTRUCTURE (("text" "plain" ("charset" "ISO-8859-1") NIL "Message text" "Quoted-printable" 227 8 NIL ("inline" NIL) NIL NIL)("application" "octet-stream" ("name" "42151000460986000506550040000387401000387404-nfe.xml") NIL "Attached file: 42151000460986000506550040000387401000387404-nfe.xml" "Base64" 11086 NIL ("attachment" ("filename" "42151000460986000506550040000387401000387404-nfe.xml")) NIL NIL)("application" "pdf" ("name" "42151000460986000506550040000387401000387404-nfe.pdf") NIL "Attached file: 42151000460986000506550040000387401000387404-nfe.pdf" "Base64" 50364 NIL ("attachment" ("filename" "42151000460986000506550040000387401000387404-nfe.pdf")) NIL NIL) "mixed" ("boundary" "017AC96C_005ED075_Synapse_boundary") "Multipart message" NIL))
当使用的GetMessage信息(UID),Protocologger给我一个有趣的信息:
S: X-mailer: Synapse - Pascal TCP/IP library by Lukas Gebauer
使用其他库时,我已经遇到了这个邮件程序的问题。
据我了解“取”属于MailKit和“的GetMessage”属于MimeKit。
那么,是否有任何解决方法继续取而不是使用GetMessage? 循环〜1500邮件和下载每一个只是为了获取附件名称需要很长时间?
有没有人在这里有类似的邮件这样的问题“Synapse - Lukas Gebauer的Pascal TCP/IP库”?
jstedfast 有趣.... 在这两种情况下,使用另一个lib,现在使用MailKit,IMAP服务器是Exchange 2007和Exchange 2013(在Office 365中使用)。 这种情况只发生在使用Synapse的信息范围为300k的情况下。 是否有任何其他信息可以帮助我们进一步了解?如果消息仍然存在,我可以尝试。 会很好用Fetch,并绕过预期,尽快它连接迷路。因此,重新开始。 – jzero