MailSpool Class

An abstract mail spool implementation.

Definition

Namespace: MailKit
Assembly: MailKit (in MailKit.dll) Version: 5.0.0
C#
public abstract class MailSpool : MailService, 
	IMailSpool, IMailService, IDisposable, IAsyncDisposable, IEnumerable<MimeMessage>, 
	IEnumerable
Inheritance
Object    MailService    MailSpool
Derived
Implements
IMailService, IMailSpool, IEnumerableMimeMessage, IEnumerable, IAsyncDisposable, IDisposable

Remarks

An abstract mail spool implementation.

Constructors

MailSpool Initializes a new instance of the MailSpool class.

Properties

AuthenticationMechanisms Gets the authentication mechanisms supported by the mail server.
(Inherited from MailService)
CheckCertificateRevocation Get or set whether connecting via SSL/TLS should check certificate revocation.
(Inherited from MailService)
ClientCertificates Get or set the client SSL certificates.
(Inherited from MailService)
Count Get the number of messages available in the message spool.
IsAuthenticated Get whether or not the client is currently authenticated with the mail server.
(Inherited from MailService)
IsConnected Gets whether or not the client is currently connected to an mail server.
(Inherited from MailService)
IsEncrypted Get whether or not the connection is encrypted (typically via SSL or TLS).
(Inherited from MailService)
IsSecure Get whether or not the connection is secure (typically via SSL or TLS).
(Inherited from MailService)
IsSigned Get whether or not the connection is signed (typically via SSL or TLS).
(Inherited from MailService)
LocalEndPoint Get or set the local IP end point to use when connecting to the remote host.
(Inherited from MailService)
Protocol Get the protocol supported by the message service.
(Inherited from MailService)
ProtocolLogger Get the protocol logger.
(Inherited from MailService)
ProxyClient Get or set the proxy client to use when connecting to a remote host.
(Inherited from MailService)
ServerCertificateValidationCallback Get or set a callback function to validate the server certificate.
(Inherited from MailService)
SslCipherSuite Get the negotiated SSL or TLS cipher suite.
(Inherited from MailService)
SslCipherSuitesPolicy Get or set the cipher suites allowed to be used when negotiating an SSL or TLS connection.
(Inherited from MailService)
SslProtocol Get the negotiated SSL or TLS protocol version.
(Inherited from MailService)
SslProtocols Get or set the set of enabled SSL and/or TLS protocol versions that the client is allowed to use.
(Inherited from MailService)
SupportsUids Get whether or not the service supports referencing messages by UIDs.
SyncRoot Get an object that can be used to synchronize access to the service.
(Inherited from MailService)
Timeout Gets or sets the timeout for network streaming operations, in milliseconds.
(Inherited from MailService)

Methods

Authenticate(ICredentials, CancellationToken) Authenticate using the supplied credentials.
(Inherited from MailService)
Authenticate(SaslMechanism, CancellationToken) Authenticate using the specified SASL mechanism.
(Inherited from MailService)
Authenticate(Encoding, ICredentials, CancellationToken) Authenticate using the supplied credentials.
(Inherited from MailService)
Authenticate(String, String, CancellationToken) Authenticate using the specified user name and password.
(Inherited from MailService)
Authenticate(Encoding, String, String, CancellationToken) Authenticate using the specified user name and password.
(Inherited from MailService)
AuthenticateAsync(ICredentials, CancellationToken) Asynchronously authenticate using the supplied credentials.
(Inherited from MailService)
AuthenticateAsync(SaslMechanism, CancellationToken) Asynchronously authenticate using the specified SASL mechanism.
(Inherited from MailService)
AuthenticateAsync(Encoding, ICredentials, CancellationToken) Asynchronously authenticate using the supplied credentials.
(Inherited from MailService)
AuthenticateAsync(String, String, CancellationToken) Asynchronously authenticate using the specified user name and password.
(Inherited from MailService)
AuthenticateAsync(Encoding, String, String, CancellationToken) Asynchronously authenticate using the specified user name and password.
(Inherited from MailService)
Connect(Uri, CancellationToken) Establish a connection to the specified mail server.
(Inherited from MailService)
Connect(String, Int32, SecureSocketOptions, CancellationToken) Establish a connection to the specified mail server.
(Inherited from MailService)
Connect(String, Int32, Boolean, CancellationToken) Establish a connection to the specified mail server.
(Inherited from MailService)
Connect(Socket, String, Int32, SecureSocketOptions, CancellationToken) Establish a connection to the specified mail server using the provided socket.
(Inherited from MailService)
Connect(Stream, String, Int32, SecureSocketOptions, CancellationToken) Establish a connection to the specified mail server using the provided stream.
(Inherited from MailService)
ConnectAsync(Uri, CancellationToken) Asynchronously establish a connection to the specified mail server.
(Inherited from MailService)
ConnectAsync(String, Int32, SecureSocketOptions, CancellationToken) Asynchronously establish a connection to the specified mail server.
(Inherited from MailService)
ConnectAsync(String, Int32, Boolean, CancellationToken) Asynchronously establish a connection to the specified mail server.
(Inherited from MailService)
ConnectAsync(Socket, String, Int32, SecureSocketOptions, CancellationToken) Asynchronously establish a connection to the specified mail server using the provided socket.
(Inherited from MailService)
ConnectAsync(Stream, String, Int32, SecureSocketOptions, CancellationToken) Asynchronously establish a connection to the specified mail server using the provided stream.
(Inherited from MailService)
DeleteAllMessages Mark all messages for deletion.
DeleteAllMessagesAsync Asynchronously mark all messages for deletion.
DeleteMessage Mark the specified message for deletion.
DeleteMessageAsync Asynchronously mark the specified message for deletion.
DeleteMessages(IListInt32, CancellationToken) Mark the specified messages for deletion.
DeleteMessages(Int32, Int32, CancellationToken) Mark the specified range of messages for deletion.
DeleteMessagesAsync(IListInt32, CancellationToken) Asynchronously mark the specified messages for deletion.
DeleteMessagesAsync(Int32, Int32, CancellationToken) Asynchronously mark the specified range of messages for deletion.
Disconnect Disconnect the service.
(Inherited from MailService)
DisconnectAsync Asynchronously disconnect the service.
(Inherited from MailService)
Dispose Releases all resource used by the MailService object.
(Inherited from MailService)
Dispose(Boolean) Releases the unmanaged resources used by the MailService and optionally releases the managed resources.
(Inherited from MailService)
DisposeAsync Asynchronously releases all resources used by the MailService object.
(Inherited from MailService)
DisposeAsyncCore Asynchronously releases the managed resources used by the MailService.
(Inherited from MailService)
Equals Determines whether the specified object is equal to the current object.
(Inherited from Object)
Finalize Releases unmanaged resources and performs other cleanup operations before the MailService is reclaimed by garbage collection.
(Inherited from MailService)
GetEnumerator Get an enumerator for the messages in the folder.
GetHashCode Serves as the default hash function.
(Inherited from Object)
GetMessage Get the message at the specified index.
GetMessageAsync Asynchronously get the message at the specified index.
GetMessageCount Get the message count.
GetMessageCountAsync Asynchronously get the message count.
GetMessageHeaders(IListInt32, CancellationToken) Get the headers for the specified messages.
GetMessageHeaders(Int32, CancellationToken) Get the headers for the specified message.
GetMessageHeaders(Int32, Int32, CancellationToken) Get the headers of the messages within the specified range.
GetMessageHeadersAsync(IListInt32, CancellationToken) Asynchronously get the headers for the specified messages.
GetMessageHeadersAsync(Int32, CancellationToken) Asynchronously get the headers for the specified message.
GetMessageHeadersAsync(Int32, Int32, CancellationToken) Get the headers of the messages within the specified range.
GetMessages(IListInt32, CancellationToken, ITransferProgress) Get the messages at the specified indexes.
GetMessages(Int32, Int32, CancellationToken, ITransferProgress) Get the messages within the specified range.
GetMessagesAsync(IListInt32, CancellationToken, ITransferProgress) Asynchronously get the messages at the specified indexes.
GetMessagesAsync(Int32, Int32, CancellationToken, ITransferProgress) Asynchronously get the messages within the specified range.
GetMessageSize Get the size of the specified message, in bytes.
GetMessageSizeAsync Asynchronously get the size of the specified message, in bytes.
GetMessageSizes Get the sizes for all available messages, in bytes.
GetMessageSizesAsync Asynchronously get the sizes for all available messages, in bytes.
GetMessageUid Get the UID of the message at the specified index.
GetMessageUidAsync Asynchronously get the UID of the message at the specified index.
GetMessageUids Get the full list of available message UIDs.
GetMessageUidsAsync Get the full list of available message UIDs.
GetSslClientAuthenticationOptions Gets the SSL/TLS client authentication options for use with .NET5's SslStream.AuthenticateAsClient() API.
(Inherited from MailService)
GetStream Get the message or header stream at the specified index.
GetStreamAsync Asynchronously get the message or header stream at the specified index.
GetStreams(IListInt32, Boolean, CancellationToken, ITransferProgress) Get the message or header streams at the specified indexes.
GetStreams(Int32, Int32, Boolean, CancellationToken, ITransferProgress) Get the message or header streams within the specified range.
GetStreamsAsync(IListInt32, Boolean, CancellationToken, ITransferProgress) Asynchronously get the message or header streams at the specified indexes.
GetStreamsAsync(Int32, Int32, Boolean, CancellationToken, ITransferProgress) Asynchronously get the message or header streams within the specified range.
GetType Gets the Type of the current instance.
(Inherited from Object)
MemberwiseClone Creates a shallow copy of the current Object.
(Inherited from Object)
NoOp Ping the mail server to keep the connection alive.
(Inherited from MailService)
NoOpAsync Asynchronously ping the mail server to keep the connection alive.
(Inherited from MailService)
OnAuthenticated Raise the authenticated event.
(Inherited from MailService)
OnConnected Raise the connected event.
(Inherited from MailService)
OnDisconnected Raise the disconnected event.
(Inherited from MailService)
Reset Reset the state of all messages marked for deletion.
ResetAsync Asynchronously reset the state of all messages marked for deletion.
ToString Returns a string that represents the current object.
(Inherited from Object)

Events

Authenticated Occurs when the client has been successfully authenticated.
(Inherited from MailService)
Connected Occurs when the client has been successfully connected.
(Inherited from MailService)
Disconnected Occurs when the client gets disconnected.
(Inherited from MailService)

See Also

Reference