Fix IMAP errors with imap.sina.net service

If you’re getting “The envelope data is corrupted or incorrect” when downloading e-mails from sina.net 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 sina.net-compatible way:

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

Fix IMAP errors with imap.sina.net service

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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