Click or drag to resize

SmtpClient Class

Represents mail client that can be used for sending messages using Simple Mail Transfer Protocol (SMTP).
Inheritance Hierarchy
SystemObject
  GemBox.Email.SmtpSmtpClient

Namespace:  GemBox.Email.Smtp
Assembly:  GemBox.Email (in GemBox.Email.dll) Version: 13.0.35.1008
Syntax
public sealed class SmtpClient : IDisposable

The SmtpClient type exposes the following members.

Constructors
  NameDescription
Public methodSmtpClient(String)
Initializes new instance of SmtpClient class with specified host address.
Public methodSmtpClient(String, Boolean)
Initializes new instance of SmtpClient class with specified host address, ConnectionSecurity option and option to ignore SSL certificate errors.
Public methodSmtpClient(String, ConnectionSecurity, Boolean)
Initializes new instance of SmtpClient class with specified host address, ConnectionSecurity option and option to ignore SSL certificate errors.
Public methodSmtpClient(String, Int32, ConnectionSecurity, RemoteCertificateValidationCallback)
Initializes new instance of SmtpClient class with specified host address and port, ConnectionSecurity option and host certificate validation delegate method.
Top
Properties
  NameDescription
Public propertyConnectTimeout
Gets or sets the connect timeout.
Public propertyHost
Gets the server address.
Public propertyIsAuthenticated
Gets whether or not client is authenticated.
Public propertyIsConnected
Gets whether or not client is connected to the server.
Public propertyLocalDomain
Gets or sets the local domain.
Public propertyLogOutput
Gets or sets the log output writer.
Public propertyPort
Gets the server IP port.
Public propertyReadTimeout
Gets or sets the read timeout.
Public propertySecurity
Gets the current connection security mode.
Public propertySupportedAuthentications
Gets collection of supported authentication mechanisms.
Public propertySupportedCapabilities
Gets the collection of supported capabilities.
Public propertyWriteTimeout
Gets or sets the write timeout.
Top
Methods
  NameDescription
Public methodAuthenticate(String, String)
Authenticates client with specified user name and password.
Public methodAuthenticate(String, String, SmtpAuthentication)
Authenticates client with specified user name, password and SmtpAuthentication mechanism.
Public methodConnect
Connects to the server.
Public methodDisconnect
Disconnects client from the server.
Public methodDispose
Disconnects client from the server and disposes all used resources.
Public methodKeepAlive
Executes NOOP command.
Public methodSendMessage
Sends the message.
Top
Events
  NameDescription
Public eventTerminated
Occurs when connection with server is terminated.
Top
Remarks
SmtpClient is implemented according to RFC 5321.
See Also