ImapGetSupportedAuthMethods Method
Returns a set of flags indicating which authentication methods are supported by the server.

Namespace: MailBee.ImapMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.4 build 677 for .NET 4.5
Syntax
public AuthenticationMethods GetSupportedAuthMethods()

Return Value

Type: AuthenticationMethods
A set of flags indicating which authentication methods are supported by the server.
Exceptions
ExceptionCondition
MailBeeExceptionAn error occurred and ThrowExceptions is true.
Remarks
If the IMAP4 server advertises LOGINDISABLED capability, regular authentication may not be supported by the server. However, this often indicates the client should call StartTls method to establish TLS/SSL secure connection. After that, regular authentication option will become available.
Examples
This sample indicates whether NTLM authentication (also known as Secure Password Authentication - SPA) is supported by the server.
// To use the code below, import MailBee namespaces at the top of your code.
using MailBee;
using MailBee.ImapMail;

// The actual code (put it into a method of your class).
Imap imp = new Imap();
imp.Connect("mail.domain.com");
AuthenticationMethods authMethods = imp.GetSupportedAuthMethods();

if ((authMethods & AuthenticationMethods.SaslNtlm) > 0)
{
    Console.WriteLine("NTLM secure authentication (SPA) is supported");
}
else
{
    Console.WriteLine("The IMAP4 server does not support NTLM (SPA)");
}
imp.Disconnect();
See Also