Allows applications to send e-mail by using the Simple Mail Transfer Protocol (SMTP).
| C# | Visual Basic |
public sealed class SmtpClient
Public NotInheritable Class SmtpClient
| All Members | Constructors | Methods | Properties | Events | |
| Icon | Member | Description |
|---|---|---|
| SmtpClient()()()() |
Initializes a new instance of the SmtpClient class by using configuration file settings.
| |
| SmtpClient(String) |
Initializes a new instance of the SmtpClient class that sends e-mail by using the specified SMTP server.
| |
| SmtpClient(String, Int32) |
Initializes a new instance of the SmtpClient class that sends e-mail by using the specified SMTP server and port.
| |
| Credentials |
Gets or sets the credentials used to authenticate the sender.
| |
| Equals(Object) | (Inherited from Object.) | |
| Finalize()()()() |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.) | |
| GetHashCode()()()() |
Serves as a hash function for a particular type.
(Inherited from Object.) | |
| GetType()()()() |
Gets the Type of the current instance.
(Inherited from Object.) | |
| Host |
Gets or sets the name or IP address of the host used for SMTP transactions.
| |
| MemberwiseClone()()()() |
Creates a shallow copy of the current Object.
(Inherited from Object.) | |
| Port |
Gets or sets the port used for SMTP transactions.
| |
| Send(String, String, String, String) |
Sends the specified e-mail message to an SMTP server for delivery.
The message sender, recipients, subject, and message body are specified using String objects.
| |
| SendAsync(String, String, String, String, Object) |
Sends an e-mail message to an SMTP server for delivery.
The message sender, recipients, subject, and message body are specified using String objects.
This method does not block the calling thread and allows the caller to pass an object to the method that is invoked when the operation completes.
| |
| SendAsyncCancel()()()() |
Cancels an asynchronous operation to send an e-mail message.
| |
| SendCompleted |
Occurs when an asynchronous e-mail send operation completes.
| |
| ToString()()()() | (Inherited from Object.) | |
| UseDefaultCredentials |
Gets or sets a Boolean value that controls whether the DefaultCredentials are sent with requests.
|
| Object | |
| SmtpClient | |