Pop3GetSupportedAuthMethods Method |
Returns a set of flags indicating which authentication methods are supported by the server.
Namespace: MailBee.Pop3MailAssembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax public AuthenticationMethods GetSupportedAuthMethods()
Public Function GetSupportedAuthMethods As AuthenticationMethods
Return Value
Type:
AuthenticationMethodsA set of flags indicating which authentication methods are supported by the server.
Exceptions 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 |
---|
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.
using MailBee;
using MailBee.Pop3Mail;
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();
Imports MailBee
Imports MailBee.Pop3Mail
Dim pop As New Pop3
pop.Connect("mail.domain.com")
Dim authMethods As AuthenticationMethods = pop.GetSupportedAuthMethods()
If ((authMethods And AuthenticationMethods.Apop) > 0) Then
Console.WriteLine("APOP secure authentication is supported")
Else
Console.WriteLine("The POP3 server does not support APOP")
End If
pop.Disconnect()
See Also