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
| Name | Description | |
|---|---|---|
| BeginConnect | Overloaded. | |
| Close | Overloaded. | |
| Connect | Overloaded. | |
| ConnectSSL |
Connects to SMTP server using SSL on port 465.
| |
| Data |
Sends "DATA" command.
| |
| Ehlo | Overloaded. | |
| EndConnect | Asynchronously accepts an incoming connection attempt. (Inherited from TcpClient.) | |
| Equals | (Inherited from Object.) | |
| GetHashCode | 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.) | |
| GetStream |
Gets SslStream or NetworkStream for current connection.
(Inherited from TcpTextClient.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| Helo |
Sends HELO to the server.
| |
| Login |
Logs user in.
| |
| MailFrom |
Sends "MAIL FROM:" command.
| |
| RcptTo |
Sends "RCPT TO:" command.
| |
| ReceiveLine |
Reads data from server until gets "\r\n" string.
(Inherited from TcpTextClient.) | |
| ReceiveMultiLine |
Recives mult-line response from server.
| |
| Send |
Sends the text command to server.
Adds "\r\n" to the command.
(Inherited from TcpTextClient.) | |
| SendCommand | Overloaded. | |
| SendMessage |
Sends single message.
| |
| StartTLS |
Sends 'STARTTLS' command and initializes SSL connection.
| |
| ToString | (Inherited from Object.) |
Protected Methods
| Name | Description | |
|---|---|---|
| CloseCommand |
Sends the Quit command. And gets server response.
(Overrides TcpTextClient..::CloseCommand()().) | |
| CreateSSLStream |
Creates SSL stream.
and authenticates client.
(Inherited from TcpTextClient.) | |
| Dispose | Releases the unmanaged resources used by the TcpClient and optionally releases the managed resources. (Inherited from TcpClient.) | |
| Finalize | Frees resources used by the TcpClient class. (Inherited from TcpClient.) | |
| GetServerGreeting |
Receives server's greeting.
(Overrides TcpTextClient..::GetServerGreeting()().) | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| OnSendProgress |
Raises the SendProgress event.
| |
| SetStreams |
Creates new Reader and
Writer objects.
With specified encoding.
Reader: Default Encoding;
Writer: ASCII Encoding.
(Overrides TcpTextClient..::SetStreams()().) |
See Also
Lesnikowski.Client Namespace