からメールをフェッチします。読書交換サーバーはすべて完璧だった。しかし、我々はオフィスに移った365。今私は自分のプロジェクトから新しいメールを読むことができません。ここに小さなコードがあります。S22のIMAPはサーバから新しいメールをフェッチするために、私はs22.Imapのreferanceを使用していoffice365
using (ImapClient client = new ImapClient("outlook.office365.com", 993, user, pass, AuthMethod.Login, true)) {
// Returns a collection of identifiers of all mails matching the specified search criteria.
IEnumerable<uint> uids = client.Search(SearchCondition.New());
// Download mail messages from the default mailbox.
IEnumerable<MailMessage> messages = client.GetMessages(uids);
foreach (MailMessage item in messages) { blablabla }
この部分は、このエラーを返す:The stream could not be read.
最後に私は、Windowsサービスアプリケーションでこのコードを使用しています。だから私は明確にデバッグしていません。
は、誰もが私を助けますか?