The Smtp type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Smtp |
Initializes a new instance of the Smtp class.
|
Methods
Name | Description | |
---|---|---|
Abort |
Aborts the current operation.
| |
BeginConnect(String, AsyncCallback, Object) |
Begins asynchronous Connect operation.
Connects to the SMTP server.
| |
BeginConnect(String, SslMode, AsyncCallback, Object) |
Begins asynchronous Connect operation.
Connects to the SMTP server with the specified security. Uses port 25 for no SSL, 587 for explicit SSL and 465 for implicit SSL.
| |
BeginConnect(String, Int32, AsyncCallback, Object) |
Begins asynchronous Connect operation.
Connects to the SMTP server.
| |
BeginConnect(String, Int32, SslMode, AsyncCallback, Object) |
Begins asynchronous Connect operation.
Connects to the SMTP server with the specified security.
| |
BeginConnect(String, Int32, TlsParameters, SmtpSecurity, AsyncCallback, Object) | Obsolete. | |
BeginDisconnect |
Begins asynchronous Disconnect operation.
Informs the server that the connection is about to close and
terminates the connection.
| |
BeginEnhancedTurn | Obsolete. | |
BeginKeepAlive |
Begins asynchronous KeepAlive operation.
Sends the NOOP command to the server to keep the connection alive.
| |
BeginLogin(GssApiProvider, AsyncCallback, Object) |
Begins asynchronous Login operation.
Authenticates the user to the SMTP server using the specified GSSAPI provider.
Only supported on Windows and partially on Mono.
| |
BeginLogin(SmtpAuthentication, AsyncCallback, Object) |
Begins asynchronous Login operation.
Authenticates the user to the SMTP server using the specified authentication method that does not require credentials (NTLM or GSSAPI).
Only supported on Windows.
| |
BeginLogin(String, SmtpAuthentication, AsyncCallback, Object) |
Begins asynchronous Login operation.
Authenticates the user to the SMTP server using an OAuth token.
| |
BeginLogin(String, String, AsyncCallback, Object) |
Begins asynchronous Login operation.
Authenticates the user to the SMTP server.
| |
BeginLogin(String, String, SmtpAuthentication, AsyncCallback, Object) |
Begins asynchronous Login operation.
Authenticates the user to the SMTP server using the specified authentication method.
| |
BeginReadResponse |
Begins asynchronous ReadResponse operation.
Returns the response of the SMTP server to the command.
| |
BeginSecure(AsyncCallback, Object) |
Begins asynchronous Secure operation.
Secures the connection with TLS/SSL using default parameters.
| |
BeginSecure(TlsParameters, AsyncCallback, Object) | Obsolete. | |
BeginSend(Stream, AsyncCallback, Object) |
Begins asynchronous Send operation.
Reads and sends a mail message from the specified stream in MIME format.
| |
BeginSend(String, AsyncCallback, Object) |
Begins asynchronous Send operation.
Reads and sends a mail message from the specified local file in MIME format.
| |
BeginSend(MailMessage, AsyncCallback, Object) |
Begins asynchronous Send operation.
Sends a mail message (MailMessage).
| |
BeginSend(MimeMessage, AsyncCallback, Object) |
Begins asynchronous Send operation.
Sends a mail message (MimeMessage).
| |
BeginSend(Stream, String, String, AsyncCallback, Object) |
Begins asynchronous Send operation.
Reads and sends a mail message from the specified stream in MIME format.
| |
BeginSend(String, String, String, AsyncCallback, Object) |
Begins asynchronous Send operation.
Reads and sends a mail message from the specified local file in MIME format.
| |
BeginSend(MailMessage, String, String, AsyncCallback, Object) |
Begins asynchronous Send operation.
Sends a mail message (MailMessage).
| |
BeginSend(MimeMessage, String, String, AsyncCallback, Object) |
Begins asynchronous Send operation.
Sends a mail message (MimeMessage).
| |
BeginSend(String, String, String, String, AsyncCallback, Object) |
Begins asynchronous Send operation.
Sends a mail message constructed from the specified parameters.
| |
BeginSendCommand |
Begins asynchronous SendCommand operation.
Executes a command on the SMTP server.
| |
BeginVerify | Obsolete. | |
Connect(String) |
Connects to the SMTP server.
| |
Connect(String, SslMode) |
Connects to the SMTP server with the specified security. Uses port 25 for no SSL, 587 for explicit SSL and 465 for implicit SSL.
| |
Connect(String, Int32) |
Connects to the SMTP server.
| |
Connect(String, Int32, SslMode) |
Connects to the SMTP server with the specified security.
| |
Connect(String, Int32, TlsParameters, SmtpSecurity) | Obsolete. | |
Disconnect |
Informs the server that the connection is about to close and
terminates the connection.
| |
Dispose()()()() |
Disposes the Smtp object and all the socket objects.
| |
Dispose(Boolean) |
Releases the unmanaged resources used by the Smtp
and optionally releases the managed resources.
| |
EndConnect |
Ends an asynchronous BeginConnect operation.
| |
EndDisconnect |
Ends an asynchronous BeginDisconnect operation.
| |
EndEnhancedTurn | Obsolete. | |
EndKeepAlive |
Ends an asynchronous BeginKeepAlive operation.
| |
EndLogin |
Ends an asynchronous BeginLogin operation.
| |
EndReadResponse |
Ends an asynchronous BeginReadResponse operation.
| |
EndSecure |
Ends an asynchronous BeginSecure operation.
| |
EndSend |
Ends an asynchronous BeginSend operation.
| |
EndSendCommand |
Ends an asynchronous BeginSendCommand operation.
| |
EndVerify | Obsolete. | |
EnhancedTurn | Obsolete. | |
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Finalize |
Finalizer. Called by garbage collector during object destruction.
(Overrides Object..::..Finalize()()()().) | |
GetConnectionState |
Checks whether the SMTP session is still connected and returns its state.
| |
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.) | |
GetSupportedAuthenticationMethods |
Gets the list of supported authentication methods.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
CheckConnectionState |
Checks whether the SMTP session is still connected. Throws an exception on error.
| |
KeepAlive |
Sends the NOOP command to the server to keep the connection alive.
| |
Login(GssApiProvider) |
Authenticates the user to the SMTP server using the specified GSSAPI provider.
Only supported on Windows and partially on Mono.
| |
Login(SmtpAuthentication) |
Authenticates the user to the SMTP server using the specified authentication method that does not require credentials (NTLM or GSSAPI).
Only supported on Windows.
| |
Login(String, SmtpAuthentication) |
Authenticates the user to the SMTP server using an OAuth token.
| |
Login(String, String) |
Authenticates the user to the SMTP server.
| |
Login(String, String, SmtpAuthentication) |
Authenticates the user to the SMTP server using the specified authentication method.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnCommandSent |
Raises the CommandSent event.
| |
OnResponseRead |
Raises the ResponseRead event.
| |
OnStateChanged |
Raises the StateChanged event.
| |
OnTlsDebug | Obsolete. | |
OnTransferProgress |
Raises the TransferProgress event.
| |
ReadResponse |
Returns the response of the SMTP server to the command.
| |
ResolveDomainMX(String) |
Retrieves the list of domain's MX records from DNS and returns the list
of hosts that accept its email (in order of preference).
| |
ResolveDomainMX(String, Int32) |
Retrieves the list of domain's MX records from DNS and returns the list
of hosts that accept its email (in order of preference).
| |
Secure()()()() |
Secures the connection with TLS/SSL using default parameters.
| |
Secure(TlsParameters) | Obsolete. | |
Send(Stream) |
Reads and sends a mail message from the specified stream in MIME format.
| |
Send(String) |
Reads and sends a mail message from the specified local file in MIME format.
| |
Send(MailMessage) |
Sends a mail message (MailMessage).
| |
Send(MimeMessage) |
Sends a mail message (MimeMessage).
| |
Send(String, SmtpConfiguration) |
Reads a mail message from the specified local file in MIME format
and sends it using the specified SMTP server.
| |
Send(String, String) |
Reads a mail message from the specified local file in MIME format
and sends it using the specified SMTP server.
| |
Send(MailMessage, SmtpConfiguration) |
Sends the message using the specified SMTP server.
| |
Send(MailMessage, String) |
Sends the message using the specified SMTP server.
| |
Send(MimeMessage, SmtpConfiguration) |
Sends the message using the specified SMTP server.
| |
Send(MimeMessage, String) |
Sends the message using the specified SMTP server.
| |
Send(Stream, String, String) |
Reads and sends a mail message from the specified stream in MIME format.
| |
Send(String, String, Int32) |
Reads a mail message from the specified local file in MIME format
and sends it using the specified SMTP server.
| |
Send(String, String, String) |
Reads and sends a mail message from the specified local file in MIME format.
| |
Send(MailMessage, String, Int32) |
Sends the message using the specified SMTP server.
| |
Send(MailMessage, String, String) |
Sends a mail message (MailMessage).
| |
Send(MimeMessage, String, Int32) |
Sends the message using the specified SMTP server.
| |
Send(MimeMessage, String, String) |
Sends a mail message (MimeMessage).
| |
Send(String, String, String, String) |
Sends a mail message constructed from the specified parameters.
| |
Send(String, String, String, String, SmtpConfiguration) |
Sends a mail message constructed from the specified parameters using the specified SMTP server.
| |
Send(String, String, String, String, String) |
Sends a mail message constructed from the specified parameters using the specified SMTP server.
| |
Send(String, String, String, String, String, Int32) |
Sends a mail message constructed from the specified parameters using the specified SMTP server.
| |
SendCommand |
Executes a command on the SMTP server.
| |
SendDirect(MailMessage) |
Sends the message by submitting the message directly to the recipients' SMTP servers.
| |
SendDirect(MimeMessage) |
Sends the message by submitting the message directly to the recipients' SMTP servers.
| |
SendDirect(String, String, String, String) |
Sends a mail message constructed from the specified parameters
by submitting it directly to the recipients' SMTP servers.
| |
SetSocketFactory |
Sets the socket factory to be used to create communication sockets.
| |
ToString |
Returns a string representation of this object.
(Overrides Object..::..ToString()()()().) | |
Verify | Obsolete. |
Fields
Name | Description | |
---|---|---|
AlternativeExplicitSslPort |
Alternative SMTP/Explicit SSL port (587).
| |
DefaultImplicitSslPort |
Default SMTP/Implicit SSL port (465).
| |
DefaultPort |
Default SMTP port (25).
|
Properties
Name | Description | |
---|---|---|
AbortTimeout |
Gets or sets the length of time before the abort operation times out.
| |
ClientDomain |
Gets or sets the domain announced by the client.
| |
DeliveryStatusNotificationConditions |
Gets or sets the bit field specifying the conditions under which the SMTP server should generate
and send a delivery status notification (DSN) messages.
| |
DeliveryStatusNotificationOriginalMessageMethod |
Gets or sets the value indicating to the SMTP server whether it should attach
the entire original message or headers only.
| |
EnabledExtensions |
Gets or sets the bit field specifying the enabled extensions.
| |
Encoding |
Gets or sets the Encoding to use to encode and decode command parameters and server responses.
| |
InstanceId |
Gets instance ID (intended for logging purposes).
(Inherited from NetworkSession.) | |
IsAuthenticated |
Returns a value indicating whether the session is authenticated.
(Overrides NetworkSession..::..IsAuthenticated.) | |
IsBusy |
Gets a value indicating whether there any operation (method) in progress.
| |
IsConnected |
Gets a value indicating whether the session is connected.
(Overrides NetworkSession..::..IsConnected.) | |
IsSecured |
Gets the value indicating whether the control connection is secured.
| |
LocalEndPoint |
Gets the local client EndPoint.
| |
LogWriter |
Gets or sets the LogWriter used by this object.
(Inherited from NetworkSession.) | |
MaxMailSize |
Gets the maximum mail message size announced by the server.
| |
Options | Obsolete. | |
Proxy |
Gets or sets the network proxy to use to access a remote server.
| |
RemoteEndPoint |
Gets the remote server EndPoint.
| |
ServerDomain |
Gets the domain announced by the server.
| |
ServerName |
Gets the server name, if available.
(Inherited from NetworkSession.) | |
ServerPort |
Gets the server port, if available.
(Inherited from NetworkSession.) | |
Settings |
Gets or sets Smtp object settings.
| |
State |
Gets the current state of the Smtp object.
| |
SupportedExtensions |
Gets the bit field specifying the extensions supported by the server.
| |
Timeout |
Gets or sets the length of time in milliseconds before the operation times out (specify -1 or 0 to indicate that the request does not time out).
| |
TlsDebugLevel | Obsolete. | |
TlsSocket |
Returns the TLS/SSL socket of secured control connection.
| |
UserName |
Gets the authenticated user name, if available.
(Inherited from NetworkSession.) | |
Version |
Returns the version of the SMTP component.
|
Events
Name | Description | |
---|---|---|
CommandSent |
Occurs when a command is send to the server.
| |
RejectedRecipient |
Occurs when a recipient is rejected by the server.
| |
ResponseRead |
Occurs when a response is received from the server.
| |
SendingMessage |
Occurs when a message is sent.
| |
StateChanged |
Occurs when the state of the Smtp object is changed.
| |
TlsDebug | Obsolete. | |
TransferProgress |
Occurs when data is send or received.
| |
ValidatingCertificate |
Occurs when a server certificate needs to be validated.
|