ImapClient.CreateAsync

ImapClient.CreateAsync method

Creates a new instance of the ImapClient class

public static Task<IAsyncImapClient> CreateAsync(string host, string username, 
    IAsyncTokenProvider asyncTokenProvider, int port = 143, 
    SecurityOptions securityOptions = SecurityOptions.Auto, 
    CancellationToken cancellationToken = default)
ParameterTypeDescription
hostStringThe host name
portStringThe port number
usernameIAsyncTokenProviderThe user name
asyncTokenProviderInt32The access token provider.
securityOptionsSecurityOptionsSecurity mode for a mail client
cancellationTokenCancellationTokenThe cancellation token.

See Also