Click or drag to resize
MimeKit

MailService Class

An abstract mail service implementation.
Inheritance Hierarchy

Namespace:  MailKit
Assembly:  MailKit (in MailKit.dll) Version: 2.3.0
Syntax
C#
public abstract class MailService : IMailService, 
	IDisposable

The MailService type exposes the following members.

Constructors
  NameDescription
Protected methodMailService
Initializes a new instance of the MailService class.
Protected methodMailService(IProtocolLogger)
Initializes a new instance of the MailService class.
Top
Properties
  NameDescription
Public propertyAuthenticationMechanisms
Gets the authentication mechanisms supported by the mail server.
Public propertyCheckCertificateRevocation
Get or set whether connecting via SSL/TLS should check certificate revocation.
Public propertyClientCertificates
Gets or sets the client SSL certificates.
Public propertyIsAuthenticated
Get whether or not the client is currently authenticated with the mail server.
Public propertyIsConnected
Gets whether or not the client is currently connected to an mail server.
Public propertyIsSecure
Get whether or not the connection is secure (typically via SSL or TLS).
Public propertyLocalEndPoint
Get or set the local IP end point to use when connecting to the remote host.
Protected propertyProtocol
Gets the protocol supported by the message service.
Public propertyProtocolLogger
Get the protocol logger.
Public propertyProxyClient
Get or set the proxy client to use when connecting to a remote host.
Public propertyCode exampleServerCertificateValidationCallback
Get or sets a callback function to validate the server certificate.
Public propertySslProtocols
Gets or sets the SSL and TLS protocol versions that the client is allowed to use.
Public propertySyncRoot
Gets an object that can be used to synchronize access to the service.
Public propertyTimeout
Gets or sets the timeout for network streaming operations, in milliseconds.
Top
Methods
  NameDescription
Public methodAuthenticate(ICredentials, CancellationToken)
Authenticate using the supplied credentials.
Public methodAuthenticate(SaslMechanism, CancellationToken)
Authenticate using the specified SASL mechanism.
Public methodCode exampleAuthenticate(String, String, CancellationToken)
Authenticate using the specified user name and password.
Public methodAuthenticate(Encoding, ICredentials, CancellationToken)
Authenticate using the supplied credentials.
Public methodAuthenticate(Encoding, String, String, CancellationToken)
Authenticate using the specified user name and password.
Public methodAuthenticateAsync(ICredentials, CancellationToken)
Asynchronously authenticate using the supplied credentials.
Public methodAuthenticateAsync(SaslMechanism, CancellationToken)
Asynchronously authenticate using the specified SASL mechanism.
Public methodAuthenticateAsync(String, String, CancellationToken)
Asynchronously authenticate using the specified user name and password.
Public methodAuthenticateAsync(Encoding, ICredentials, CancellationToken)
Asynchronously authenticate using the supplied credentials.
Public methodAuthenticateAsync(Encoding, String, String, CancellationToken)
Asynchronously authenticate using the specified user name and password.
Public methodCode exampleConnect(Uri, CancellationToken)
Establish a connection to the specified mail server.
Public methodCode exampleConnect(String, Int32, SecureSocketOptions, CancellationToken)
Establish a connection to the specified mail server.
Public methodConnect(String, Int32, Boolean, CancellationToken)
Establish a connection to the specified mail server.
Public methodConnect(Stream, String, Int32, SecureSocketOptions, CancellationToken)
Establish a connection to the specified mail server using the provided stream.
Public methodConnect(Socket, String, Int32, SecureSocketOptions, CancellationToken)
Establish a connection to the specified mail server using the provided socket.
Public methodConnectAsync(Uri, CancellationToken)
Asynchronously establish a connection to the specified mail server.
Public methodConnectAsync(String, Int32, SecureSocketOptions, CancellationToken)
Asynchronously establish a connection to the specified mail server.
Public methodConnectAsync(String, Int32, Boolean, CancellationToken)
Asynchronously establish a connection to the specified mail server.
Public methodConnectAsync(Stream, String, Int32, SecureSocketOptions, CancellationToken)
Asynchronously establish a connection to the specified mail server using the provided stream.
Public methodConnectAsync(Socket, String, Int32, SecureSocketOptions, CancellationToken)
Asynchronously establish a connection to the specified mail server using the provided socket.
Public methodStatic memberDefaultServerCertificateValidationCallback
The default server certificate validation callback used when connecting via SSL or TLS.
Public methodCode exampleDisconnect
Disconnect the service.
Public methodDisconnectAsync
Asynchronously disconnect the service.
Public methodDispose
Releases all resource used by the MailService object.
Protected methodDispose(Boolean)
Releases the unmanaged resources used by the MailService and optionally releases the managed resources.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Releases unmanaged resources and performs other cleanup operations before the MailService is reclaimed by garbage collection.
(Overrides ObjectFinalize.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodNoOp
Ping the mail server to keep the connection alive.
Public methodNoOpAsync
Asynchronously ping the mail server to keep the connection alive.
Protected methodOnAuthenticated
Raise the authenticated event.
Protected methodOnConnected
Raise the connected event.
Protected methodOnDisconnected
Raise the disconnected event.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Events
  NameDescription
Public eventAuthenticated
Occurs when the client has been successfully authenticated.
Public eventConnected
Occurs when the client has been successfully connected.
Public eventDisconnected
Occurs when the client gets disconnected.
Top
Remarks
An abstract mail service implementation.
See Also