我發現了一個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