Fix IMAP errors with service

If you’re getting “The envelope data is corrupted or incorrect” when downloading e-mails from with MailBee.NET Objects, you may face the issue that their mail server returns IMAP envelopes incorrectly in case if a message becomes read (Seen) during downloading.

You can avoid this by keeping message flags intact during downloading (so that download process won’t trigger Seen flag). This code downloads last e-mail in the current folder in way:

imp.SetSeenForEntireMessages = false; // Do not set Seen flag on download
MailMessage msg = imp.DownloadEntireMessage(imp.MessageCount, false);

Fix IMAP errors with service

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s