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

Free Support Forum - aspose.com

How could I use CRAM-MD5 for IMAP authentication?

I have a IMAP account which password has some special characters (é è ) and cannot get the IMAP client, I will get a login error when create the client. It also tried S22.IMAP, and I can connect to the IMAP server using CRAM-MD5 authentication method. But I’m not clear how to use Aspose to connect with CRAM-MD5. Could someone help me on this?

Welcome to our community! Thank you for the query. Could you clarify which programming language you are using with Aspose.Email, please?

sorry for my unclear description.
I’m using C# with Aspose.Email 20.2.

There were many updates after version 20.2. Please check the issue with the password characters with the latest version of Aspose.Email. If the problem persists, please confirm it.

I added a ticket with ID EMAILNET-40250 to our tracking system. Our development team will investigate this possibility. I will inform you of any progress.

Today I try with Aspose.Email 21.4, but it will not automatically use CRAM-MD5 for authentication. May be there are some properties or configurations need changed to use CRAM-MD5.
Currently I’m just create a IMAP client like this:
var client = new ImapClient(host, port, username, password, securityOptions);

Thank you for the additional information. When I have some news about it, I will answer you at once.


We have tried to move further with issues investigation and request you to please provide a test account for a server with CRAM-MD5 authentication. This is old authentication type and our servers does not support it. please provide requested information so that we may proceed further on our end.

Sorry, I could not provide a test account because is not public and cannot be accessed from outside.
We are using smarter mail client, and it has a free edition. You can get it from https://www.smartertools.com/smartermail/downloads#/pills-free.
Could you deploy an environment based on this? Then you can try with CRAM-MD5 authentication.
PS, I want to use CRAM-MD5 because there is a account which has some special characters in his password. If the CRAM-MD5 is legacy or hard to test, is there any other authenticate methods available when there are special characters in password?


Thank you for the feedback. Let me discuss with our team if that is possible. Otherwise, there would be no way other than sharing the information.

The issues you have found earlier (filed as EMAILNET-40250) have been fixed in this update.

Please use the next code example for using CRAM-MD5 with Aspose.Email 21.7:

using (ImapClient imapClient = new ImapClient("server", 143, "username", "password", SecurityOptions.None))
    imapClient.AllowedAuthentication = ImapKnownAuthenticationType.CramMD5; // only CramMD5

API Reference: ImapKnownAuthenticationType Enumeration