SmtpClient Constructor (String, Int32, String, String, Boolean, SecurityOptions)

Initializes a new instance of the SmtpClient class.

Namespace:  Aspose.Email.Clients.Smtp
Assembly:  Aspose.Email (in Aspose.Email.dll) Version: 22.4
Syntax
public SmtpClient(
	string host,
	int port,
	string username,
	string authInfo,
	bool useOAuth,
	SecurityOptions securityOptions
)

Parameters

host
Type: SystemString
The name of the host used for SMTP.
port
Type: SystemInt32
The port used for SMTP.
username
Type: SystemString
The username.
authInfo
Type: SystemString
The user password or XOAUTH2 access token
useOAuth
Type: SystemBoolean
Defines whether SASL XOAUTH2 mechanism is used to login to the server
securityOptions
Type: Aspose.Email.ClientsSecurityOptions
Security mode for a mail client
See Also