The popAuthLogin and popAuthPlain
authentication methods require the mail server support the Simple
Authentication and Security Layer (SASL) AUTH command as defined in
RFC 5034. Most modern mail servers do support one or both of these
methods, and they are generally preferred over the popAuthPass
method when possible. However, for backwards compatibility with
legacy servers, the API will default to using popAuthPass
for client authentication.
The popAuthXOAuth2 and popAuthBearer
authentication methods are similar, but they are not interchangeable. Both
use an OAuth 2.0 bearer token to authenticate the client session, but they
differ in how the token is presented to the server. It is currently
preferable to use the XOAUTH2 method because it is more widely available
and some service providers do not yet support the OAUTHBEARER method.
Changing the value of the BearerToken property will
automatically set the current authentication method to use OAuth 2.0.