AuthType Property  
 

Gets and sets the method used to authenticate the user.

Syntax

object.AuthType [= type ]

Remarks

The AuthType property specifies the type of authentication that should be used when the client connects to the mail server. The following authentication methods are supported:

Value Description
httpAuthNone No client authentication should be performed.
httpAuthBasic The Basic authentication scheme should be used. This option is supported by all servers that support at least version 1.0 of the protocol. The user credentials are not encrypted and Basic authentication should not be used over standard (non-secure) connections. Most web services which use Basic authentication require the connection to be secure.
httpAuthBearer The Bearer authentication scheme should be used. This authentication method does not require a user name and the BearerToken property must specify the OAuth 2.0 bearer token issued by the service provider. If the access token has expired, the request will fail with an authorization error. This function will not automatically refresh an expired token.

Data Type

Integer (Int32)

Remarks

Setting the authentication type to httpAuthNone will remove any values set for the UserName, Password and BearerToken properties.

You should only use an OAuth 2.0 authentication method if you understand the process of how to request the access token. Obtaining an access token requires registering your application with the mail service provider (e.g.: Microsoft or Google), getting a unique client ID associated with your application and then requesting the access token using the appropriate scope for the service. Obtaining the initial token will typically involve interactive confirmation on the part of the user, requiring they grant permission to your application to access their mail account.

Changing the value of the BearerToken property will automatically set the current authentication method to use OAuth 2.0.

See Also

BearerToken Property, Password Property, UserName Property, Authenticate Method, Connect Method