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

Namespace: MailBee.Pop3Mail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 11.2.0 build 590 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
This method performs round-trip to the server only if the list of authentication methods has not already been downloaded. Since this list is a part of the server capabilities, it will already be available in the local cache if the server capabilities have already been downloaded during this connection (for instance, due to GetExtensions method call). If the list of supported authentication methods is already available in the local cache, this method will immediately return the cached results.
Note Note
If the POP3 server does not support CAPA command and the client already logged in the mailbox, it's not possible to get the list of supported authentication methods (unless it has already been downloaded prior to logging in). This is because AUTH command (which returns the list of authentication methods available) cannot be issued once the client has logged in.
Examples
This sample indicates whether APOP authentication is supported by the server.
// To use the code below, import MailBee namespaces at the top of your code
using MailBee;
using MailBee.Pop3Mail;

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

if ((authMethods & AuthenticationMethods.Apop) > 0)
{
    Console.WriteLine("APOP secure authentication is supported");
}
else
{
    Console.WriteLine("The POP3 server does not support APOP");
}
pop.Disconnect();
See Also