SmtpClient.SmtpClient

SmtpClient()

Initializes a new instance of the SmtpClient class.

public SmtpClient()

See Also


SmtpClient(Configuration)

Initializes a new instance of the SmtpClient class by using configuration file settings.

public SmtpClient(Configuration configuration)
ParameterTypeDescription
configurationConfigurationThe configuration.

Remarks

Initializes the Host, Port, Username, Password properties for the new SmtpClient.

See Also


SmtpClient(string)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host)
ParameterTypeDescription
hostStringThe name of the host used for SMTP.

See Also


SmtpClient(string, SecurityOptions)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host, SecurityOptions securityOptions)
ParameterTypeDescription
hostStringThe name of the host used for SMTP.
securityOptionsSecurityOptionsSecurity mode for a mail client

See Also


SmtpClient(string, int)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host, int port)
ParameterTypeDescription
hostStringThe name of the host used for SMTP.
portInt32The port used for SMTP.

See Also


SmtpClient(string, int, SecurityOptions)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host, int port, SecurityOptions securityOptions)
ParameterTypeDescription
hostStringThe name of the host used for SMTP.
portInt32The port used for SMTP.
securityOptionsSecurityOptionsSecurity mode for a mail client

See Also


SmtpClient(string, string, string)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host, string username, string password)
ParameterTypeDescription
hostStringThe name of the host used for SMTP.
usernameStringThe username.
passwordStringThe password. Password limitations are defined by server implementation, which the client connects.

See Also


SmtpClient(string, string, string, SecurityOptions)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host, string username, string password, SecurityOptions securityOptions)
ParameterTypeDescription
hostStringThe name of the host used for SMTP.
usernameStringThe username.
passwordStringThe password. Password limitations are defined by server implementation, which the client connects.
securityOptionsSecurityOptionsSecurity mode for a mail client

See Also


SmtpClient(string, int, string, string)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host, int port, string username, string password)
ParameterTypeDescription
hostStringThe name of the host used for SMTP.
portInt32The port used for SMTP.
usernameStringThe username.
passwordStringThe password. Password limitations are defined by server implementation, which the client connects.

See Also


SmtpClient(string, int, string, string, SecurityOptions)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host, int port, string username, string password, 
    SecurityOptions securityOptions)
ParameterTypeDescription
hostStringThe name of the host used for SMTP.
portInt32The port used for SMTP.
usernameStringThe username.
passwordStringThe password. Password limitations are defined by server implementation, which the client connects.
securityOptionsSecurityOptionsSecurity mode for a mail client

See Also


SmtpClient(string, string, string, bool)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host, string username, string authInfo, bool useOAuth)
ParameterTypeDescription
hostStringThe name of the host used for SMTP.
usernameStringThe username.
authInfoStringThe user password or XOAUTH2 access token
useOAuthBooleanDefines whether SASL XOAUTH2 mechanism is used to login to the server

See Also


SmtpClient(string, string, string, bool, SecurityOptions)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host, string username, string authInfo, bool useOAuth, 
    SecurityOptions securityOptions)
ParameterTypeDescription
hostStringThe name of the host used for SMTP.
usernameStringThe username.
authInfoStringThe user password or XOAUTH2 access token
useOAuthBooleanDefines whether SASL XOAUTH2 mechanism is used to login to the server
securityOptionsSecurityOptionsSecurity mode for a mail client

See Also


SmtpClient(string, int, string, string, bool)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host, int port, string username, string authInfo, bool useOAuth)
ParameterTypeDescription
hostStringThe name of the host used for SMTP.
portInt32The port used for SMTP.
usernameStringThe username.
authInfoStringThe user password or XOAUTH2 access token
useOAuthBooleanDefines whether SASL XOAUTH2 mechanism is used to login to the server

See Also


SmtpClient(string, int, string, string, bool, SecurityOptions)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host, int port, string username, string authInfo, bool useOAuth, 
    SecurityOptions securityOptions)
ParameterTypeDescription
hostStringThe name of the host used for SMTP.
portInt32The port used for SMTP.
usernameStringThe username.
authInfoStringThe user password or XOAUTH2 access token
useOAuthBooleanDefines whether SASL XOAUTH2 mechanism is used to login to the server
securityOptionsSecurityOptionsSecurity mode for a mail client

See Also


SmtpClient(string, string, ITokenProvider)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host, string username, ITokenProvider tokenProvider)
ParameterTypeDescription
hostStringThe name of the host used for SMTP.
usernameStringThe username.
tokenProviderITokenProviderTokenProvider allowing to retrieve access token.

See Also


SmtpClient(string, string, ITokenProvider, SecurityOptions)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host, string username, ITokenProvider tokenProvider, 
    SecurityOptions securityOptions)
ParameterTypeDescription
hostStringThe name of the host used for SMTP.
usernameStringThe username.
tokenProviderITokenProviderTokenProvider allowing to retrieve access token.
securityOptionsSecurityOptionsSecurity mode for a mail client

See Also


SmtpClient(string, int, string, ITokenProvider)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host, int port, string username, ITokenProvider tokenProvider)
ParameterTypeDescription
hostStringThe name of the host used for SMTP.
portInt32The port used for SMTP.
usernameStringThe username.
tokenProviderITokenProviderTokenProvider allowing to retrieve access token.

See Also


SmtpClient(string, int, string, ITokenProvider, SecurityOptions)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host, int port, string username, ITokenProvider tokenProvider, 
    SecurityOptions securityOptions)
ParameterTypeDescription
hostStringThe name of the host used for SMTP.
portInt32The port used for SMTP.
usernameStringThe username.
tokenProviderITokenProviderTokenProvider allowing to retrieve access token.
securityOptionsSecurityOptionsSecurity mode for a mail client

See Also


SmtpClient(string, int, string, string, RemoteCertificateValidationCallback)

Initializes a new instance of the SmtpClient class

public SmtpClient(string host, int port, string username, string password, 
    RemoteCertificateValidationCallback userCertificateValidationCallback)
ParameterTypeDescription
hostStringThe host name
portInt32The portnumber
usernameStringThe user name
passwordStringThe password
userCertificateValidationCallbackRemoteCertificateValidationCallbackSystem.Net.Security.RemoteCertificateValidationCallback

See Also