The Smtp type exposes the following members.

Constructors

  NameDescription
Public methodSupported by the .NET Compact FrameworkSmtp
Initializes a new instance of the Smtp class.

Methods

  NameDescription
Public methodSupported by the .NET Compact FrameworkAbort
Aborts the current operation.
Public methodSupported by the .NET Compact FrameworkBeginConnect(String, AsyncCallback, Object)
Begins asynchronous Connect operation. Connects to the SMTP server.
Public methodSupported by the .NET Compact FrameworkBeginConnect(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.
Public methodSupported by the .NET Compact FrameworkBeginConnect(String, Int32, AsyncCallback, Object)
Begins asynchronous Connect operation. Connects to the SMTP server.
Public methodSupported by the .NET Compact FrameworkBeginConnect(String, Int32, SslMode, AsyncCallback, Object)
Begins asynchronous Connect operation. Connects to the SMTP server with the specified security.
Public methodSupported by the .NET Compact FrameworkBeginConnect(String, Int32, TlsParameters, SmtpSecurity, AsyncCallback, Object) Obsolete.
Public methodSupported by the .NET Compact FrameworkBeginDisconnect
Begins asynchronous Disconnect operation. Informs the server that the connection is about to close and terminates the connection.
Public methodSupported by the .NET Compact FrameworkBeginEnhancedTurn Obsolete.
Public methodSupported by the .NET Compact FrameworkBeginKeepAlive
Begins asynchronous KeepAlive operation. Sends the NOOP command to the server to keep the connection alive.
Public methodSupported by the .NET Compact FrameworkBeginLogin(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.
Public methodSupported by the .NET Compact FrameworkBeginLogin(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.
Public methodSupported by the .NET Compact FrameworkBeginLogin(String, SmtpAuthentication, AsyncCallback, Object)
Begins asynchronous Login operation. Authenticates the user to the SMTP server using an OAuth token.
Public methodSupported by the .NET Compact FrameworkBeginLogin(String, String, AsyncCallback, Object)
Begins asynchronous Login operation. Authenticates the user to the SMTP server.
Public methodSupported by the .NET Compact FrameworkBeginLogin(String, String, SmtpAuthentication, AsyncCallback, Object)
Begins asynchronous Login operation. Authenticates the user to the SMTP server using the specified authentication method.
Public methodSupported by the .NET Compact FrameworkBeginReadResponse
Begins asynchronous ReadResponse operation. Returns the response of the SMTP server to the command.
Public methodSupported by the .NET Compact FrameworkBeginSecure(AsyncCallback, Object)
Begins asynchronous Secure operation. Secures the connection with TLS/SSL using default parameters.
Public methodSupported by the .NET Compact FrameworkBeginSecure(TlsParameters, AsyncCallback, Object) Obsolete.
Public methodSupported by the .NET Compact FrameworkBeginSend(Stream, AsyncCallback, Object)
Begins asynchronous Send operation. Reads and sends a mail message from the specified stream in MIME format.
Public methodSupported by the .NET Compact FrameworkBeginSend(String, AsyncCallback, Object)
Begins asynchronous Send operation. Reads and sends a mail message from the specified local file in MIME format.
Public methodSupported by the .NET Compact FrameworkBeginSend(MailMessage, AsyncCallback, Object)
Begins asynchronous Send operation. Sends a mail message (MailMessage).
Public methodSupported by the .NET Compact FrameworkBeginSend(MimeMessage, AsyncCallback, Object)
Begins asynchronous Send operation. Sends a mail message (MimeMessage).
Public methodSupported by the .NET Compact FrameworkBeginSend(Stream, String, String, AsyncCallback, Object)
Begins asynchronous Send operation. Reads and sends a mail message from the specified stream in MIME format.
Public methodSupported by the .NET Compact FrameworkBeginSend(String, String, String, AsyncCallback, Object)
Begins asynchronous Send operation. Reads and sends a mail message from the specified local file in MIME format.
Public methodSupported by the .NET Compact FrameworkBeginSend(MailMessage, String, String, AsyncCallback, Object)
Begins asynchronous Send operation. Sends a mail message (MailMessage).
Public methodSupported by the .NET Compact FrameworkBeginSend(MimeMessage, String, String, AsyncCallback, Object)
Begins asynchronous Send operation. Sends a mail message (MimeMessage).
Public methodSupported by the .NET Compact FrameworkBeginSend(String, String, String, String, AsyncCallback, Object)
Begins asynchronous Send operation. Sends a mail message constructed from the specified parameters.
Public methodSupported by the .NET Compact FrameworkBeginSendCommand
Begins asynchronous SendCommand operation. Executes a command on the SMTP server.
Public methodSupported by the .NET Compact FrameworkBeginVerify Obsolete.
Public methodSupported by the .NET Compact FrameworkConnect(String)
Connects to the SMTP server.
Public methodSupported by the .NET Compact FrameworkConnect(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.
Public methodSupported by the .NET Compact FrameworkConnect(String, Int32)
Connects to the SMTP server.
Public methodSupported by the .NET Compact FrameworkConnect(String, Int32, SslMode)
Connects to the SMTP server with the specified security.
Public methodSupported by the .NET Compact FrameworkConnect(String, Int32, TlsParameters, SmtpSecurity) Obsolete.
Public methodSupported by the .NET Compact FrameworkDisconnect
Informs the server that the connection is about to close and terminates the connection.
Public methodSupported by the .NET Compact FrameworkDispose()()()()
Disposes the Smtp object and all the socket objects.
Protected methodSupported by the .NET Compact FrameworkDispose(Boolean)
Releases the unmanaged resources used by the Smtp and optionally releases the managed resources.
Public methodSupported by the .NET Compact FrameworkEndConnect
Ends an asynchronous BeginConnect operation.
Public methodSupported by the .NET Compact FrameworkEndDisconnect
Ends an asynchronous BeginDisconnect operation.
Public methodSupported by the .NET Compact FrameworkEndEnhancedTurn Obsolete.
Public methodSupported by the .NET Compact FrameworkEndKeepAlive
Ends an asynchronous BeginKeepAlive operation.
Public methodSupported by the .NET Compact FrameworkEndLogin
Ends an asynchronous BeginLogin operation.
Public methodSupported by the .NET Compact FrameworkEndReadResponse
Ends an asynchronous BeginReadResponse operation.
Public methodSupported by the .NET Compact FrameworkEndSecure
Ends an asynchronous BeginSecure operation.
Public methodSupported by the .NET Compact FrameworkEndSend
Ends an asynchronous BeginSend operation.
Public methodSupported by the .NET Compact FrameworkEndSendCommand
Ends an asynchronous BeginSendCommand operation.
Public methodSupported by the .NET Compact FrameworkEndVerify Obsolete.
Public methodSupported by the .NET Compact FrameworkEnhancedTurn Obsolete.
Public methodSupported by the .NET Compact FrameworkEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodSupported by the .NET Compact FrameworkFinalize
Finalizer. Called by garbage collector during object destruction.
(Overrides Object..::..Finalize()()()().)
Public methodSupported by the .NET Compact FrameworkGetConnectionState
Checks whether the SMTP session is still connected and returns its state.
Public methodSupported by the .NET Compact FrameworkGetHashCode
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 methodSupported by the .NET Compact FrameworkGetSupportedAuthenticationMethods
Gets the list of supported authentication methods.
Public methodSupported by the .NET Compact FrameworkGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodSupported by the .NET Compact FrameworkCheckConnectionState
Checks whether the SMTP session is still connected. Throws an exception on error.
Public methodSupported by the .NET Compact FrameworkKeepAlive
Sends the NOOP command to the server to keep the connection alive.
Public methodSupported by the .NET Compact FrameworkLogin(GssApiProvider)
Authenticates the user to the SMTP server using the specified GSSAPI provider. Only supported on Windows and partially on Mono.
Public methodSupported by the .NET Compact FrameworkLogin(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.
Public methodSupported by the .NET Compact FrameworkLogin(String, SmtpAuthentication)
Authenticates the user to the SMTP server using an OAuth token.
Public methodSupported by the .NET Compact FrameworkLogin(String, String)
Authenticates the user to the SMTP server.
Public methodSupported by the .NET Compact FrameworkLogin(String, String, SmtpAuthentication)
Authenticates the user to the SMTP server using the specified authentication method.
Protected methodSupported by the .NET Compact FrameworkMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodSupported by the .NET Compact FrameworkOnCommandSent
Raises the CommandSent event.
Protected methodSupported by the .NET Compact FrameworkOnResponseRead
Raises the ResponseRead event.
Protected methodSupported by the .NET Compact FrameworkOnStateChanged
Raises the StateChanged event.
Protected methodSupported by the .NET Compact FrameworkOnTlsDebug Obsolete.
Protected methodSupported by the .NET Compact FrameworkOnTransferProgress
Raises the TransferProgress event.
Public methodSupported by the .NET Compact FrameworkReadResponse
Returns the response of the SMTP server to the command.
Public methodStatic memberSupported by the .NET Compact FrameworkResolveDomainMX(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).
Public methodStatic memberSupported by the .NET Compact FrameworkResolveDomainMX(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).
Public methodSupported by the .NET Compact FrameworkSecure()()()()
Secures the connection with TLS/SSL using default parameters.
Public methodSupported by the .NET Compact FrameworkSecure(TlsParameters) Obsolete.
Public methodSupported by the .NET Compact FrameworkSend(Stream)
Reads and sends a mail message from the specified stream in MIME format.
Public methodSupported by the .NET Compact FrameworkSend(String)
Reads and sends a mail message from the specified local file in MIME format.
Public methodSupported by the .NET Compact FrameworkSend(MailMessage)
Sends a mail message (MailMessage).
Public methodSupported by the .NET Compact FrameworkSend(MimeMessage)
Sends a mail message (MimeMessage).
Public methodStatic memberSupported by the .NET Compact FrameworkSend(String, SmtpConfiguration)
Reads a mail message from the specified local file in MIME format and sends it using the specified SMTP server.
Public methodStatic memberSupported by the .NET Compact FrameworkSend(String, String)
Reads a mail message from the specified local file in MIME format and sends it using the specified SMTP server.
Public methodStatic memberSupported by the .NET Compact FrameworkSend(MailMessage, SmtpConfiguration)
Sends the message using the specified SMTP server.
Public methodStatic memberSupported by the .NET Compact FrameworkSend(MailMessage, String)
Sends the message using the specified SMTP server.
Public methodStatic memberSupported by the .NET Compact FrameworkSend(MimeMessage, SmtpConfiguration)
Sends the message using the specified SMTP server.
Public methodStatic memberSupported by the .NET Compact FrameworkSend(MimeMessage, String)
Sends the message using the specified SMTP server.
Public methodSupported by the .NET Compact FrameworkSend(Stream, String, String)
Reads and sends a mail message from the specified stream in MIME format.
Public methodStatic memberSupported by the .NET Compact FrameworkSend(String, String, Int32)
Reads a mail message from the specified local file in MIME format and sends it using the specified SMTP server.
Public methodSupported by the .NET Compact FrameworkSend(String, String, String)
Reads and sends a mail message from the specified local file in MIME format.
Public methodStatic memberSupported by the .NET Compact FrameworkSend(MailMessage, String, Int32)
Sends the message using the specified SMTP server.
Public methodSupported by the .NET Compact FrameworkSend(MailMessage, String, String)
Sends a mail message (MailMessage).
Public methodStatic memberSupported by the .NET Compact FrameworkSend(MimeMessage, String, Int32)
Sends the message using the specified SMTP server.
Public methodSupported by the .NET Compact FrameworkSend(MimeMessage, String, String)
Sends a mail message (MimeMessage).
Public methodSupported by the .NET Compact FrameworkSend(String, String, String, String)
Sends a mail message constructed from the specified parameters.
Public methodStatic memberSupported by the .NET Compact FrameworkSend(String, String, String, String, SmtpConfiguration)
Sends a mail message constructed from the specified parameters using the specified SMTP server.
Public methodStatic memberSupported by the .NET Compact FrameworkSend(String, String, String, String, String)
Sends a mail message constructed from the specified parameters using the specified SMTP server.
Public methodStatic memberSupported by the .NET Compact FrameworkSend(String, String, String, String, String, Int32)
Sends a mail message constructed from the specified parameters using the specified SMTP server.
Public methodSupported by the .NET Compact FrameworkSendCommand
Executes a command on the SMTP server.
Public methodStatic memberSupported by the .NET Compact FrameworkSendDirect(MailMessage)
Sends the message by submitting the message directly to the recipients' SMTP servers.
Public methodStatic memberSupported by the .NET Compact FrameworkSendDirect(MimeMessage)
Sends the message by submitting the message directly to the recipients' SMTP servers.
Public methodStatic memberSupported by the .NET Compact FrameworkSendDirect(String, String, String, String)
Sends a mail message constructed from the specified parameters by submitting it directly to the recipients' SMTP servers.
Public methodSupported by the .NET Compact FrameworkSetSocketFactory
Sets the socket factory to be used to create communication sockets.
Public methodSupported by the .NET Compact FrameworkToString
Returns a string representation of this object.
(Overrides Object..::..ToString()()()().)
Public methodSupported by the .NET Compact FrameworkVerify Obsolete.

Fields

  NameDescription
Public fieldStatic memberSupported by the .NET Compact FrameworkAlternativeExplicitSslPort
Alternative SMTP/Explicit SSL port (587).
Public fieldStatic memberSupported by the .NET Compact FrameworkDefaultImplicitSslPort
Default SMTP/Implicit SSL port (465).
Public fieldStatic memberSupported by the .NET Compact FrameworkDefaultPort
Default SMTP port (25).

Properties

  NameDescription
Public propertySupported by the .NET Compact FrameworkAbortTimeout
Gets or sets the length of time before the abort operation times out.
Public propertySupported by the .NET Compact FrameworkClientDomain
Gets or sets the domain announced by the client.
Public propertySupported by the .NET Compact FrameworkDeliveryStatusNotificationConditions
Gets or sets the bit field specifying the conditions under which the SMTP server should generate and send a delivery status notification (DSN) messages.
Public propertySupported by the .NET Compact FrameworkDeliveryStatusNotificationOriginalMessageMethod
Gets or sets the value indicating to the SMTP server whether it should attach the entire original message or headers only.
Public propertySupported by the .NET Compact FrameworkEnabledExtensions
Gets or sets the bit field specifying the enabled extensions.
Public propertySupported by the .NET Compact FrameworkEncoding
Gets or sets the Encoding to use to encode and decode command parameters and server responses.
Protected propertySupported by the .NET Compact FrameworkInstanceId
Gets instance ID (intended for logging purposes).
(Inherited from NetworkSession.)
Public propertySupported by the .NET Compact FrameworkIsAuthenticated
Returns a value indicating whether the session is authenticated.
(Overrides NetworkSession..::..IsAuthenticated.)
Public propertySupported by the .NET Compact FrameworkIsBusy
Gets a value indicating whether there any operation (method) in progress.
Public propertySupported by the .NET Compact FrameworkIsConnected
Gets a value indicating whether the session is connected.
(Overrides NetworkSession..::..IsConnected.)
Public propertySupported by the .NET Compact FrameworkIsSecured
Gets the value indicating whether the control connection is secured.
Public propertySupported by the .NET Compact FrameworkLocalEndPoint
Gets the local client EndPoint.
Public propertySupported by the .NET Compact FrameworkLogWriter
Gets or sets the LogWriter used by this object.
(Inherited from NetworkSession.)
Public propertySupported by the .NET Compact FrameworkMaxMailSize
Gets the maximum mail message size announced by the server.
Public propertySupported by the .NET Compact FrameworkOptions Obsolete.
Public propertySupported by the .NET Compact FrameworkProxy
Gets or sets the network proxy to use to access a remote server.
Public propertySupported by the .NET Compact FrameworkRemoteEndPoint
Gets the remote server EndPoint.
Public propertySupported by the .NET Compact FrameworkServerDomain
Gets the domain announced by the server.
Public propertySupported by the .NET Compact FrameworkServerName
Gets the server name, if available.
(Inherited from NetworkSession.)
Public propertySupported by the .NET Compact FrameworkServerPort
Gets the server port, if available.
(Inherited from NetworkSession.)
Public propertySupported by the .NET Compact FrameworkSettings
Gets or sets Smtp object settings.
Public propertySupported by the .NET Compact FrameworkState
Gets the current state of the Smtp object.
Public propertySupported by the .NET Compact FrameworkSupportedExtensions
Gets the bit field specifying the extensions supported by the server.
Public propertySupported by the .NET Compact FrameworkTimeout
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).
Public propertySupported by the .NET Compact FrameworkTlsDebugLevel Obsolete.
Public propertySupported by the .NET Compact FrameworkTlsSocket
Returns the TLS/SSL socket of secured control connection.
Public propertySupported by the .NET Compact FrameworkUserName
Gets the authenticated user name, if available.
(Inherited from NetworkSession.)
Public propertyStatic memberSupported by the .NET Compact FrameworkVersion
Returns the version of the SMTP component.

Events

  NameDescription
Public eventSupported by the .NET Compact FrameworkCommandSent
Occurs when a command is send to the server.
Public eventSupported by the .NET Compact FrameworkRejectedRecipient
Occurs when a recipient is rejected by the server.
Public eventSupported by the .NET Compact FrameworkResponseRead
Occurs when a response is received from the server.
Public eventSupported by the .NET Compact FrameworkSendingMessage
Occurs when a message is sent.
Public eventSupported by the .NET Compact FrameworkStateChanged
Occurs when the state of the Smtp object is changed.
Public eventSupported by the .NET Compact FrameworkTlsDebug Obsolete.
Public eventSupported by the .NET Compact FrameworkTransferProgress
Occurs when data is send or received.
Public eventSupported by the .NET Compact FrameworkValidatingCertificate
Occurs when a server certificate needs to be validated.

See Also