SmtpClient

SmtpClient constructor (1 of 18)

Initializes a new instance of the SmtpClient class.

public SmtpClient()

See Also


SmtpClient constructor (2 of 18)

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

public SmtpClient(Configuration configuration)
Parameter Type Description
configuration Configuration The configuration.

Remarks

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

See Also


SmtpClient constructor (3 of 18)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host)
Parameter Type Description
host String The name of the host used for SMTP.

See Also


SmtpClient constructor (4 of 18)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host, SecurityOptions securityOptions)
Parameter Type Description
host String The name of the host used for SMTP.
securityOptions SecurityOptions Security mode for a mail client

See Also


SmtpClient constructor (5 of 18)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host, int port)
Parameter Type Description
host String The name of the host used for SMTP.
port Int32 The port used for SMTP.

See Also


SmtpClient constructor (6 of 18)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host, int port, SecurityOptions securityOptions)
Parameter Type Description
host String The name of the host used for SMTP.
port Int32 The port used for SMTP.
securityOptions SecurityOptions Security mode for a mail client

See Also


SmtpClient constructor (7 of 18)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host, string username, string password)
Parameter Type Description
host String The name of the host used for SMTP.
username String The username.
password String The password. Password limitations are defined by server implementation, which the client connects.

See Also


SmtpClient constructor (8 of 18)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host, string username, string password, SecurityOptions securityOptions)
Parameter Type Description
host String The name of the host used for SMTP.
username String The username.
password String The password. Password limitations are defined by server implementation, which the client connects.
securityOptions SecurityOptions Security mode for a mail client

See Also


SmtpClient constructor (9 of 18)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host, int port, string username, string password)
Parameter Type Description
host String The name of the host used for SMTP.
port Int32 The port used for SMTP.
username String The username.
password String The password. Password limitations are defined by server implementation, which the client connects.

See Also


SmtpClient constructor (10 of 18)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host, int port, string username, string password, 
    SecurityOptions securityOptions)
Parameter Type Description
host String The name of the host used for SMTP.
port Int32 The port used for SMTP.
username String The username.
password String The password. Password limitations are defined by server implementation, which the client connects.
securityOptions SecurityOptions Security mode for a mail client

See Also


SmtpClient constructor (11 of 18)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host, string username, string authInfo, bool useOAuth)
Parameter Type Description
host String The name of the host used for SMTP.
username String The username.
authInfo String The user password or XOAUTH2 access token
useOAuth Boolean Defines whether SASL XOAUTH2 mechanism is used to login to the server

See Also


SmtpClient constructor (12 of 18)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host, string username, string authInfo, bool useOAuth, 
    SecurityOptions securityOptions)
Parameter Type Description
host String The name of the host used for SMTP.
username String The username.
authInfo String The user password or XOAUTH2 access token
useOAuth Boolean Defines whether SASL XOAUTH2 mechanism is used to login to the server
securityOptions SecurityOptions Security mode for a mail client

See Also


SmtpClient constructor (13 of 18)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host, int port, string username, string authInfo, bool useOAuth)
Parameter Type Description
host String The name of the host used for SMTP.
port Int32 The port used for SMTP.
username String The username.
authInfo String The user password or XOAUTH2 access token
useOAuth Boolean Defines whether SASL XOAUTH2 mechanism is used to login to the server

See Also


SmtpClient constructor (14 of 18)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host, int port, string username, string authInfo, bool useOAuth, 
    SecurityOptions securityOptions)
Parameter Type Description
host String The name of the host used for SMTP.
port Int32 The port used for SMTP.
username String The username.
authInfo String The user password or XOAUTH2 access token
useOAuth Boolean Defines whether SASL XOAUTH2 mechanism is used to login to the server
securityOptions SecurityOptions Security mode for a mail client

See Also


SmtpClient constructor (15 of 18)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host, string username, ITokenProvider tokenProvider)
Parameter Type Description
host String The name of the host used for SMTP.
username String The username.
tokenProvider ITokenProvider TokenProvider allowing to retrieve access token.

See Also


SmtpClient constructor (16 of 18)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host, string username, ITokenProvider tokenProvider, 
    SecurityOptions securityOptions)
Parameter Type Description
host String The name of the host used for SMTP.
username String The username.
tokenProvider ITokenProvider TokenProvider allowing to retrieve access token.
securityOptions SecurityOptions Security mode for a mail client

See Also


SmtpClient constructor (17 of 18)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host, int port, string username, ITokenProvider tokenProvider)
Parameter Type Description
host String The name of the host used for SMTP.
port Int32 The port used for SMTP.
username String The username.
tokenProvider ITokenProvider TokenProvider allowing to retrieve access token.

See Also


SmtpClient constructor (18 of 18)

Initializes a new instance of the SmtpClient class.

public SmtpClient(string host, int port, string username, ITokenProvider tokenProvider, 
    SecurityOptions securityOptions)
Parameter Type Description
host String The name of the host used for SMTP.
port Int32 The port used for SMTP.
username String The username.
tokenProvider ITokenProvider TokenProvider allowing to retrieve access token.
securityOptions SecurityOptions Security mode for a mail client

See Also