An unhandled exception of type 'Limilabs.Client.IMAP.ImapResponseException' occurred in Mail.dll
Additional information: [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
using (Imap imap = new Imap())
//Pass Host Name as string for connection
//Pass Credential for Gmail account for Login Use Login() Method
//Select Folder as of Now i am selecting Inbox Folder
FolderStatus _folderStatus = imap.SelectInbox();
//Find all Unseen Message Set to Flag Property
List<long> uids = imap.SearchFlag(Flag.Unseen);
foreach (long uid in uids)
//Download Message Based On UID
byte eml = imap.GetMessageByUID(uid);
//Parse Download MEssage
IMail imail = new MailBuilder().CreateFromEml(eml);
First log in to the specified account via the web browser, you might have received an email with the blocked attempt information. Review it - you might need to confirm it was you.
There are several ways of dealing with this error:
Please note that contrary to what the label says those applications (such as Thunderbird, Outlook and Mail.dll) are secure – they use TLS or SSL to secure the communication. The label name Gmail uses is misleading and false.
Use OAuth 2.0 (OAuth 2.0 for installed applications, OAuth 2.0 for web applications, OAuth 2.0 for service accounts)
Use application specific passwords (You can find how to create one in the Gmail support site)
In some cases you'll need to use unlock captcha (use incognito mode so you are sure you are logged in to correct account): https://accounts.google.com/DisplayUnlockCaptcha
Here are more information on how to enable IMAP in Gmail.
VAT: PL 5213195875
02-707, Warsaw Poland