Click or drag to resize
MimeKit

IMailService Interface

An interface for message services such as SMTP, POP3, or IMAP.

Namespace: MailKit
Assembly: MailKit (in MailKit.dll) Version: 4.7.1
Syntax
C#
public interface IMailService : IDisposable

The IMailService type exposes the following members.

Properties
 NameDescription
Public propertyAuthenticationMechanisms Get the authentication mechanisms supported by the message service.
Public propertyCheckCertificateRevocation Get or set whether connecting via SSL/TLS should check certificate revocation.
Public propertyClientCertificates Get or set the client SSL certificates.
Public propertyIsAuthenticated Get whether or not the client is currently authenticated with the mail server.
Public propertyIsConnected Get whether or not the service is currently connected.
Public propertyIsEncrypted Get whether or not the connection is encrypted (typically via SSL or TLS).
Public propertyIsSecure Get whether or not the connection is secure (typically via SSL or TLS).
Public propertyIsSigned Get whether or not the connection is signed (typically via SSL or TLS).
Public propertyLocalEndPoint Get or set the local IP end point to use when connecting to a remote host.
Public propertyCode exampleProxyClient Get or set the proxy client to use when connecting to a remote host.
Public propertyCode exampleServerCertificateValidationCallback Get or set a callback function to validate the server certificate.
Public propertySslCipherAlgorithm Get the negotiated SSL or TLS cipher algorithm.
Public propertySslCipherStrength Get the negotiated SSL or TLS cipher algorithm strength.
Public propertySslHashAlgorithm Get the negotiated SSL or TLS hash algorithm.
Public propertySslHashStrength Get the negotiated SSL or TLS hash algorithm strength.
Public propertySslKeyExchangeAlgorithm Get the negotiated SSL or TLS key exchange algorithm.
Public propertySslKeyExchangeStrength Get the negotiated SSL or TLS key exchange algorithm strength.
Public propertySslProtocol Get the negotiated SSL or TLS protocol version.
Public propertySslProtocols Get or set the set of enabled SSL and/or TLS protocol versions that the client is allowed to use.
Public propertySyncRoot Get an object that can be used to synchronize access to the folder.
Public propertyTimeout Get or set 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 methodAuthenticate(Encoding, ICredentials, CancellationToken) Authenticate using the supplied credentials.
Public methodCode exampleAuthenticate(String, String, CancellationToken) Authenticate using the specified user name and password.
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(Encoding, ICredentials, CancellationToken) Asynchronously authenticate using the supplied credentials.
Public methodAuthenticateAsync(String, String, CancellationToken) Asynchronously authenticate using the specified user name and password.
Public methodAuthenticateAsync(Encoding, String, String, CancellationToken) Asynchronously authenticate using the specified user name and password.
Public methodConnect(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(Socket, String, Int32, SecureSocketOptions, CancellationToken) Establish a connection to the specified mail server using the provided socket.
Public methodConnect(Stream, String, Int32, SecureSocketOptions, CancellationToken) Establish a connection to the specified mail server using the provided stream.
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(Socket, String, Int32, SecureSocketOptions, CancellationToken) Asynchronously establish a connection to the specified mail server using the provided socket.
Public methodConnectAsync(Stream, String, Int32, SecureSocketOptions, CancellationToken) Asynchronously establish a connection to the specified mail server using the provided stream.
Public methodDisconnect Disconnect the service.
Public methodDisconnectAsync Asynchronously disconnect the service.
Public methodDispose
(Inherited from IDisposable)
Public methodNoOp Ping the message service to keep the connection alive.
Public methodNoOpAsync Asynchronously ping the mail server to keep the connection alive.
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 has been disconnected.
Top
Remarks
Implemented by ImapClient, Pop3Client and SmtpClient.
See Also