We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Unable to connect to Mail server using ImapClient

Hi,

This is the first time we are trying to use the ASPOSE ImapClient using the following line of code:

ImapClient client = new ImapClient("xxx.xx.x.xxx", 123, "xxx", "xxx");

client.SelectFolder(ImapFolderInfo.InBox);

but after examining the client object, I found the ConnectionState as closed and when I try to select Inbox folder of primary mailbox, getting error Command failure. What is the possible reason behind this?

Thanks

Rahul

Hi Rahul,


Thank you for using Asose.Email for .NET.

Could you please share which server you are trying to connect using our ImapClient component? Please note that if the server provides an SSL enabled connection, then you need to connect to the server by setting the SSL flag as well. Please refer to our online documentation article Connecting with SSL enabled IMAP server for further details in this regard.

Hi Kashif,

Thanks for your quick reply.

We are trying to connect the Microsoft Exchange Server 7. Yes SSL is enabled on server. I try your suggested settings for SSL but getting error Server can not be authenticated. Do we need to pass some other information.

Please refer the attachment for the code written n error we got.

Regards

Rahul

Hi Rahul,


We have tried to re-produce the scenario using your code and our test account credentials. I am afraid to share that I could not observe the issue and connection was established successfully.

Now to proceed further, I would request you to arrange some test account on the said server and provide us the credentials for testing. Please make arrangements that the temporary account remains available until our testing is completed. It will help us to re-produce the scenario and provide assistance as soon as possible.