Workaround for intermittent “NO [ALERT]” errors in IMAP

Sometimes (a customer faced this with imap.orange.fr provider), you may be getting intermittent NO responses which cause MailBee to throw an exception (MailBee doesn’t know if this response is intermittent or not). This usually happens when selecting a folder.

For instance, the following can be found in the log:

[16:35:00.52] [RECV] * NO [ALERT] Mailbox is at 83% of quota\r\n [Total 41 bytes received.]

To workaround this problem, just repeat select folder operation in case if the previous one failed due to a negative response from the IMAP server.

try
{
  imap.SelectFolder("INBOX");
}
catch (MailBeeImapNegativeResponseException)
{
  imap.SelectFolder("INBOX");
}
Workaround for intermittent “NO [ALERT]” errors in IMAP

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