Syntax

C#
public class Smtp
Visual Basic (Declaration)
Public Class Smtp
Visual C++
public ref class Smtp

The type exposes the following methods.

Public Methods

  NameDescription
Public methodBeginConnectOverloaded.
Public methodCloseOverloaded.
Public methodConnectOverloaded.
Public methodConnectSSL
Connects to SMTP server using SSL on port 465.
Public methodData
Sends "DATA" command.
Public methodEhloOverloaded.
Public methodEndConnect
Asynchronously accepts an incoming connection attempt.
(Inherited from TcpClient.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type. GetHashCode()() is suitable for use in hashing algorithms and data structures like a hash table.
(Inherited from Object.)
Public methodGetStream
Gets SslStream or NetworkStream for current connection.
(Inherited from TcpTextClient.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodHelo
Sends HELO to the server.
Public methodLogin
Logs user in.
Public methodMailFrom
Sends "MAIL FROM:" command.
Public methodRcptTo
Sends "RCPT TO:" command.
Public methodReceiveLine
Reads data from server until gets "\r\n" string.
(Inherited from TcpTextClient.)
Public methodReceiveMultiLine
Recives mult-line response from server.
Public methodSend
Sends the text command to server. Adds "\r\n" to the command.
(Inherited from TcpTextClient.)
Public methodSendCommandOverloaded.
Public methodSendMessage
Sends single message.
Public methodStartTLS
Sends 'STARTTLS' command and initializes SSL connection.
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)

Protected Methods

  NameDescription
Protected methodCloseCommand
Sends the Quit command. And gets server response.
(Overrides TcpTextClient..::CloseCommand()().)
Protected methodCreateSSLStream
Creates SSL stream. and authenticates client.
(Inherited from TcpTextClient.)
Protected methodDispose
Releases the unmanaged resources used by the TcpClient and optionally releases the managed resources.
(Inherited from TcpClient.)
Protected methodFinalize
Frees resources used by the TcpClient class.
(Inherited from TcpClient.)
Protected methodGetServerGreeting
Receives server's greeting.
(Overrides TcpTextClient..::GetServerGreeting()().)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnSendProgress
Raises the SendProgress event.
Protected methodSetStreams
Creates new Reader and Writer objects. With specified encoding. Reader: Default Encoding; Writer: ASCII Encoding.
(Overrides TcpTextClient..::SetStreams()().)

See Also