Declaration
public RTSmtpClient(
string host,
int port,
string username = null,
string password = null,
SmtpEncryption encryption = SmtpEncryption.None,
LoggerBase log = null,
int timeout = 10000
)
Summary
Creates a connection to the SMTP server and authenticates the specified user.
Parameters
string | host |
SMTP host name. |
int | port |
SMTP host port. |
string | username |
SMTP username. |
string | password |
SMTP password. |
SmtpEncryption | encryption |
Encryption mode. |
LoggerBase | log |
The SMTP client logs various messages to this log at various verbosity levels. |
int | timeout |
Network stream read/write timeout, in milliseconds. |
Exceptions
- RT.Util.RTSmtpException
SMTP protocol error, or authentication failed.
- System.IO.IOException
Network error or timeout.