SmtpClient.CreateAsync
SmtpClient.CreateAsync method
Creates a new instance of the SmtpClient
class
public static Task<IAsyncSmtpClient> CreateAsync(string host, string username,
IAsyncTokenProvider asyncTokenProvider, int port = 25,
SecurityOptions securityOptions = SecurityOptions.Auto,
CancellationToken cancellationToken = default)
Parameter | Type | Description |
---|---|---|
host | String | The host name |
port | String | The port number |
username | IAsyncTokenProvider | The user name |
asyncTokenProvider | Int32 | The access token provider. |
securityOptions | SecurityOptions | Security mode for a mail client |
cancellationToken | CancellationToken | The cancellation token. |
See Also
- interface IAsyncSmtpClient
- interface IAsyncTokenProvider
- enum SecurityOptions
- class SmtpClient
- namespace Aspose.Email.Clients.Smtp
- assembly Aspose.Email