0 votes

I am trying to connect my address via IMAP like this:

 imap.Connect("myhost");  
 imap.Login("myusername", "mypassword");

But, I get this error in the second line:
An unhandled exception of type 'Limilabs.Client.IMAP.ImapResponseException' occurred in Mail.dll

Additional information: LOGIN Failed - The mailbox you specified does not have access to this service.

When I try BestLogin function instead of Login function, I get the following error:
An unhandled exception of type 'Limilabs.Client.IMAP.ImapResponseException' occurred in Mail.dll

Additional information: AUTHENTICATE CRAM-MD5 Failed - The mailbox you specified does not have access to this service.

What is the problem?

by

1 Answer

0 votes

The error message generated by the IMAP server is clear and in both cases exactly the same:

The mailbox you specified does not have access to this service.

You should contact your server administrator. Most likely IMAP access is disabled for this account.

As a side note:
Use UseBestLogin method - it chooses the right authentication based on the server's capabilities, whereas Login always uses LOGIN authentication method.

by (297k points)
...