All I am trying to do is to have my application read the subject and main body from an email sent to a gmail account. I have enabled SSL, enabled imap in the gmail imap settings, enabled a mode where any application can gain access, and yet it continues to give me this error:
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)
The username and password for the account are correct and if i change them to anything else, it says the credentials are invalid.
The code throws the exception above on the third line of this code:
Using imap As New Imap()
imap.ConnectSSL("imap.gmail.com")
imap.UseBestLogin("username@gmail.com", "password")
End Using
Why on earth am i getting this exception?
Thank you.