The following tables list the members exposed by Smtp.

      Public Constructors

      NameDescription
      Public ConstructorsSmtp ConstructorOverloaded. Initializes a new instance of the Smtp class.
      Top

      Public Properties

      NameDescription
      Public PropertiesAbortTimeoutGets or sets the length of time before the abort operation times out.
      Public PropertiesClientDomainGets or sets the domain announced by the client.
      Public PropertiesConfigGets or sets Smtp object settings.
      Public PropertiesDeliveryStatusNotificationReturnMessageMethodGets or sets the value indicating to the SMTP server whether it should attach the entire original message or headers only.
      Public PropertiesDeliveryStatusNotificationTypeGets or sets the bit field specifying the conditions under which the SMTP server should generate and send a delivery status notification (DSN) messages.
      Public PropertiesEnabledFeaturesGets or sets the bit field specifying the enabled extensions.
      Public PropertiesEncodingGets or sets the Encoding to use to encode and decode command parameters and server responses.
      Public PropertiesInstanceIdGets instance ID (intended for logging purposes).
      Public PropertiesInvokeFromCurrentThreadsGets a value indicating whether to raise events from the current thread or to use a SynchronizationContext object available when an asynchronous operation was started. The default value is false.
      Public PropertiesIsAuthenticatedReturns a value indicating whether the session is authenticated.
      Public PropertiesIsBusyGets a value indicating whether there any operation (method) in progress.
      Public PropertiesIsConnectedGets a value indicating whether the session is connected.
      Public PropertiesIsConnectionSecuredGets the value indicating whether the control connection is secured.
      Public PropertiesLocalEndPointGets the local client EndPoint.
      Public PropertiesLogSourceGets or sets the source object for all log messages generated by this object. If not set, the property returns the current object.
      Public PropertiesMaxMailSizeGets the maximum mail message size announced by the server.
      Public PropertiesProxyGets or sets the network proxy to use to access a remote server.
      Public PropertiesRemoteEndPointGets the remote server EndPoint.
      Public PropertiesServerDomainGets the domain announced by the server.
      Public PropertiesServerNameGets the server name, if available.
      Public PropertiesServerPortGets the server port, if available.
      Public PropertiesStateGets the current state of the Smtp object.
      Public PropertiesSupportedFeaturesGets the bit field specifying the extensions supported by the server.
      Public PropertiesTimeoutGets 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).
      Virtual Public PropertiesTraceListenerManagerGets or sets the TraceListenerManager object to which the log messages generated by this object are sent. If not set, the Default trace listener manager is used. If this property is set to null, all messages from this object wont be logged.
      Virtual Public PropertiesTraceSourceGets or sets the source object for all log messages generated by this object. If not set, the property returns the current object.
      Public PropertiesUserNameGets the authenticated user name, if available.
      Top

      Public Fields

      NameDescription
      Public FieldsStatic MemberAlternativeExplicitSslPortAlternative SMTP/Explicit SSL port (587).
      Public FieldsStatic MemberDefaultImplicitSslPortDefault SMTP/Implicit SSL port (465).
      Public FieldsStatic MemberDefaultPortDefault SMTP port (25).
      Top

      Public Methods

      NameDescription
      Public MethodsAuthenticateOverloaded. Authenticates the user to the SMTP server using the specified authentication method that does not require credentials (NTLM or GSSAPI).
      Public MethodsAuthenticateAsyncOverloaded. Asynchronous authenticates the user to the SMTP server using the specified authentication method that does not require credentials (NTLM or GSSAPI).
      Public MethodsCancelAborts the current operation.
      Public MethodsCheckSessionChecks whether the SMTP session is still connected. Throws an exception on error.
      Public MethodsConnectOverloaded. Connects to the SMTP server.
      Public MethodsConnectAsyncOverloaded. Asynchronously connects to the SMTP server.
      Public MethodsDisconnectDisconnects from the SMTP server and returns exit message from the server.
      Public MethodsDisconnectAsyncOverloaded. Asynchronously disconnects from the SMTP server and returns exit message from the server.
      Public MethodsDisposeDisposes the Smtp object and all the socket objects.
      Public MethodsEnhancedTurnInstructs the server to start processing the message queue for a specified node (domain).
      Public MethodsEnhancedTurnAsyncOverloaded. Asynchronously sends the ETRN command to the server to start processing the message queue for a specified node (domain).
      Public MethodsStatic MemberGetDomainMXAsyncOverloaded. Asynchronously returns the list of available MX records in order of preference of the specified domain.
      Public MethodsGetSessionStatusChecks whether the SMTP session is still connected and returns its state.
      Public MethodsGetSupportedAuthenticationMethodsGets the list of supported authentication methods.
      Public MethodsKeepAliveSends a NOOP command to the server to keep the connection alive.
      Public MethodsKeepAliveAsyncOverloaded. Asynchronously sends a NOOP command to the server to keep the connection alive.
      Public MethodsReadResponseReturns the response of the SMTP server to the command.
      Public MethodsReadResponseAsyncOverloaded. Asynchronously returns the corresponding response of the SMTP server to the command that was sent using the SendCommand method.
      Public MethodsStatic MemberResolveDomainMxOverloaded. 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 MethodsSendOverloaded. Sends a mail message (MimeMessage).
      Public MethodsSendAsyncOverloaded. Asynchronously sends the mail message to the specified recipients.
      Public MethodsSendCommandExecutes a command on the SMTP server.
      Public MethodsSendCommandAsyncOverloaded. Asynchronously sends user-defined command to the server.
      Public MethodsStatic MemberSendDirectOverloaded. Sends the message by submitting the message directly to the recipients' SMTP servers.
      Public MethodsSetSocketFactorySets the socket factory to be used to create communication sockets.
      Public MethodsToStringOverridden. Returns a string representation of this object.
      Public MethodsUpgradeConnectionOverloaded. Secures the connection with TLS/SSL using default parameters.
      Public MethodsUpgradeConnectionAsyncOverloaded. Asynchronously secures the connection with TLS/SSL using default parameters.
      Public MethodsVerifyVerifies whether the server is willing to accept mail for a given recipient.
      Public MethodsVerifyAsyncOverloaded. Asynchronously verifies if given email address is accepted by the server without actual submitting of the message data.
      Top

      Protected Methods

      Top

      Public Events

      NameDescription
      Public EventsAuthenticateCompletedOccurs when an asynchronous authentication operation completes.
      Public EventsCertificateReceivedOccurs when an SMTP server's certificate was received and verified.
      Public EventsCertificateRequiredOccurs when a client certificate is required by the SMTP server, or the one provided was not accepted.
      Public EventsCommandResponseOccurs when a command has been sent to or a response is received from the server.
      Public EventsConnectCompletedOccurs when an asynchronous ConnectAsync operation completes.
      Public EventsDisconnectCompletedOccurs when an asynchronous DisconnectAsync operation completes.
      Public EventsEnhancedTurnCompletedOccurs when an asynchronous EnhancedTurnAsync operation completes.
      Public EventsKeepAliveCompletedOccurs when an asynchronous KeepAliveAsync operation completes.
      Public EventsProgressOccurs when data is send or received.
      Public EventsReadResponseCompletedOccurs when an asynchronous ReadResponseAsync operation completes.
      Public EventsRejectedRecipientOccurs when a recipient is rejected by the server.
      Public EventsSendCommandCompletedOccurs when an asynchronous SendCommandAsync operation completes.
      Public EventsSendCompletedOccurs when an asynchronous SendAsync operation completes.
      Public EventsSendingMessageOccurs when a message is being sent.
      Public EventsStateChangedOccurs when the state of the Smtp object is changed.
      Public EventsUpgradeConnectionCompletedOccurs when an asynchronous UpgradeConnectionAsync operation completes.
      Public EventsVerifyCompletedOccurs when an asynchronous VerifyAsync operation completes.
      Top

      See Also