Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Constructor: RTSmtpClient(string, int, string, string, SmtpEncryption, LoggerBase, int)

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

stringhost SMTP host name.
intport SMTP host port.
stringusername SMTP username.
stringpassword SMTP password.
SmtpEncryptionencryption Encryption mode.
LoggerBaselog The SMTP client logs various messages to this log at various verbosity levels.
inttimeout Network stream read/write timeout, in milliseconds.

Exceptions

  • RT.Util.RTSmtpException
    SMTP protocol error, or authentication failed.
  • System.IO.IOException
    Network error or timeout.