Method | Description | |
---|---|---|
Authenticate ( Portable.Text.Encoding encoding, ICredentials credentials, |
Authenticate using the supplied credentials. If the IMAP server supports one or more SASL authentication mechanisms, then the SASL mechanisms that both the client and server support are tried in order of greatest security to weakest security. Once a SASL authentication mechanism is found that both client and server support, the credentials are used to authenticate. If the server does not support SASL or if no common SASL mechanisms can be found, then LOGIN command is used as a fallback. |
|
Compress ( |
Enable compression over the IMAP connection. Enables compression over the IMAP connection. If the IMAP server supports the ImapCapabilities.Compress extension, it is possible at any point after connecting to enable compression to reduce network bandwidth usage. Ideally, this method should be called before authenticating. |
|
CompressAsync ( |
Asynchronously enable compression over the IMAP connection. Asynchronously enables compression over the IMAP connection. If the IMAP server supports the ImapCapabilities.Compress extension, it is possible at any point after connecting to enable compression to reduce network bandwidth usage. Ideally, this method should be called before authenticating. |
|
Connect ( Socket socket, string host, int port, SecureSocketOptions options = SecureSocketOptions.Auto, |
Establish a connection to the specified IMAP or IMAP/S server using the provided socket. Establishes a connection to the specified IMAP or IMAP/S server using the provided socket. If the port has a value of If the options has a value of SecureSocketOptions.Auto, then the port is used to determine the default security options. If the port has a value of Once a connection is established, properties such as AuthenticationMechanisms and Capabilities will be populated. |
|
Connect ( string host, int port, SecureSocketOptions options = SecureSocketOptions.Auto, |
Establish a connection to the specified IMAP server. Establishes a connection to the specified IMAP or IMAP/S server. If the port has a value of If the options has a value of SecureSocketOptions.Auto, then the port is used to determine the default security options. If the port has a value of Once a connection is established, properties such as AuthenticationMechanisms and Capabilities will be populated. |
|
Disconnect ( bool quit, |
Disconnect the service. If quit is |
|
EnableQuickResync ( |
Enable the QRESYNC feature. Enables the QRESYNC feature. The QRESYNC extension improves resynchronization performance of folders by querying the IMAP server for a list of changes when the folder is opened using the ImapFolder.Open(FolderAccess,uint,ulong,System.Collections.Generic.IList<UniqueId>,System.Threading.CancellationToken) method. If this feature is enabled, the MailFolder.MessageExpunged event is replaced with the MailFolder.MessagesVanished event. This method needs to be called immediately after calling one of the Authenticate methods, before opening any folders. |
|
EnableUTF8 ( |
Enable the UTF8=ACCEPT extension. Enables the UTF8=ACCEPT extension. |
|
EnableUTF8Async ( |
Enable the UTF8=ACCEPT extension. Enables the UTF8=ACCEPT extension. |
|
GetFolder ( FolderNamespace @namespace ) : IMailFolder |
Get the folder for the specified namespace. Gets the folder for the specified namespace. |
|
GetFolder ( SpecialFolder folder ) : IMailFolder |
Get the specified special folder. Not all IMAP servers support special folders. Only IMAP servers supporting the ImapCapabilities.SpecialUse or ImapCapabilities.XList extensions may have special folders. |
|
GetFolder ( string path, |
Get the folder for the specified path. Gets the folder for the specified path. |
|
GetFolders ( FolderNamespace @namespace, StatusItems items = StatusItems.None, bool subscribedOnly = false, |
Get all of the folders within the specified namespace. Gets all of the folders within the specified namespace. |
|
GetMetadata ( MetadataOptions options, IEnumerable |
Gets the specified metadata. Gets the specified metadata. |
|
GetMetadata ( MetadataTag tag, |
Gets the specified metadata. Gets the specified metadata. |
|
Identify ( MailKit.Net.Imap.ImapImplementation clientImplementation, |
Identify the client implementation to the server and obtain the server implementation details. Passes along the client implementation details to the server while also obtaining implementation details from the server. If the clientImplementation is Security Implications This command has the danger of violating the privacy of users if misused. Clients should notify users that they send the ID command. It is highly desirable that implementations provide a method of disabling ID support, perhaps by not calling this method at all, or by passing Implementors must exercise extreme care in adding properties to the clientImplementation. Some properties, such as a processor ID number, Ethernet address, or other unique (or mostly unique) identifier would allow tracking of users in ways that violate user privacy expectations and may also make it easier for attackers to exploit security holes in the client. |
|
IdentifyAsync ( MailKit.Net.Imap.ImapImplementation clientImplementation, |
Asynchronously identify the client implementation to the server and obtain the server implementation details. Passes along the client implementation details to the server while also obtaining implementation details from the server. If the clientImplementation is Security Implications This command has the danger of violating the privacy of users if misused. Clients should notify users that they send the ID command. It is highly desirable that implementations provide a method of disabling ID support, perhaps by not calling this method at all, or by passing Implementors must exercise extreme care in adding properties to the clientImplementation. Some properties, such as a processor ID number, Ethernet address, or other unique (or mostly unique) identifier would allow tracking of users in ways that violate user privacy expectations and may also make it easier for attackers to exploit security holes in the client. |
|
Idle ( |
Toggle the ImapClient into the IDLE state. When a client enters the IDLE state, the IMAP server will send events to the client as they occur on the selected folder. These events may include notifications of new messages arriving, expunge notifications, flag changes, etc. Due to the nature of the IDLE command, a folder must be selected before a client can enter into the IDLE state. This can be done by opening a folder using MailKit.MailFolder.Open(FolderAccess,System.Threading.CancellationToken) or any of the other variants. While the IDLE command is running, no other commands may be issued until the doneToken is cancelled. |
|
IdleAsync ( |
Asynchronously toggle the ImapClient into the IDLE state. When a client enters the IDLE state, the IMAP server will send events to the client as they occur on the selected folder. These events may include notifications of new messages arriving, expunge notifications, flag changes, etc. Due to the nature of the IDLE command, a folder must be selected before a client can enter into the IDLE state. This can be done by opening a folder using MailKit.MailFolder.Open(FolderAccess,System.Threading.CancellationToken) or any of the other variants. While the IDLE command is running, no other commands may be issued until the doneToken is cancelled. |
|
ImapClient ( ) : System |
Initializes a new instance of the MailKit.Net.Imap.ImapClient class. Before you can retrieve messages with the ImapClient, you must first call one of the Connect methods and then authenticate with the one of the Authenticate methods. |
|
ImapClient ( IProtocolLogger protocolLogger ) : System |
Initializes a new instance of the MailKit.Net.Imap.ImapClient class. Before you can retrieve messages with the ImapClient, you must first call one of the Connect methods and then authenticate with the one of the Authenticate methods. |
|
NoOp ( |
Ping the IMAP server to keep the connection alive. The The When the IMAP server receives a For more information about the |
|
Reconnect ( string password, |
Reconnect to the most recently connected IMAP server. Reconnects to the most recently connected IMAP server. Once a successful connection is made, the session will then be re-authenticated using the account name used in the previous session and the password. |
|
ReconnectAsync ( string password, |
Asynchronously reconnect to the most recently connected IMAP server. Asynchronously reconnects to the most recently connected IMAP server. Once a successful connection is made, the session will then be re-authenticated using the account name used in the previous session and the password. |
|
SetMetadata ( MetadataCollection metadata, |
Sets the specified metadata. Sets the specified metadata. |
Method | Description | |
---|---|---|
CreateImapFolder ( MailKit.Net.Imap.ImapFolderConstructorArgs args ) : |
Instantiate a new ImapFolder. Creates a new ImapFolder instance. |
|
Dispose ( bool disposing ) : void |
Releases the unmanaged resources used by the ImapClient and optionally releases the managed resources. Releases the unmanaged resources used by the ImapClient and optionally releases the managed resources. |
Method | Description | |
---|---|---|
CheckAuthenticated ( ) : void | ||
CheckConnected ( ) : void | ||
CheckDisposed ( ) : void | ||
ComputeDefaultValues ( string host, int &port, SecureSocketOptions &options, |
||
CreateAuthenticationException ( |
||
EscapeUserName ( string userName ) : string | ||
GetSessionIdentifier ( string userName ) : string | ||
HexEscape ( char c ) : string | ||
HexUnescape ( string pattern, int &index ) : char | ||
IdleComplete ( object state ) : void | ||
IsHexDigit ( char c ) : bool | ||
OnEngineAlert ( object sender, AlertEventArgs e ) : void | ||
OnEngineDisconnected ( object sender, |
||
ProcessResponseCodes ( |
||
ReplayConnect ( string host, Stream replayStream, |
||
UnescapeUserName ( string escaped ) : string | ||
ValidateRemoteCertificate ( object sender, |
public Authenticate ( Portable.Text.Encoding encoding, ICredentials credentials, |
||
encoding | Portable.Text.Encoding | The text encoding to use for the user's credentials. |
credentials | ICredentials | The user's credentials. |
cancellationToken | The cancellation token. | |
return | void |
public Compress ( |
||
cancellationToken | The cancellation token. | |
return | void |
public CompressAsync ( |
||
cancellationToken | The cancellation token. | |
return | System.Threading.Task |
public Connect ( Socket socket, string host, int port, SecureSocketOptions options = SecureSocketOptions.Auto, |
||
socket | Socket | The socket to use for the connection. |
host | string | The host name to connect to. |
port | int | The port to connect to. If the specified port is |
options | SecureSocketOptions | The secure socket options to when connecting. |
cancellationToken | The cancellation token. | |
return | void |
public Connect ( string host, int port, SecureSocketOptions options = SecureSocketOptions.Auto, |
||
host | string | The host name to connect to. |
port | int | The port to connect to. If the specified port is |
options | SecureSocketOptions | The secure socket options to when connecting. |
cancellationToken | The cancellation token. | |
return | void |
protected CreateImapFolder ( MailKit.Net.Imap.ImapFolderConstructorArgs args ) : |
||
args | MailKit.Net.Imap.ImapFolderConstructorArgs | The constructior arguments. |
return |
public Disconnect ( bool quit, |
||
quit | bool | If set to |
cancellationToken | The cancellation token. | |
return | void |
protected Dispose ( bool disposing ) : void | ||
disposing | bool | |
return | void |
public EnableQuickResync ( |
||
cancellationToken | The cancellation token. | |
return | void |
public EnableUTF8 ( |
||
cancellationToken | The cancellation token. | |
return | void |
public EnableUTF8Async ( |
||
cancellationToken | The cancellation token. | |
return | System.Threading.Task |
public GetFolder ( FolderNamespace @namespace ) : IMailFolder | ||
@namespace | FolderNamespace | |
return | IMailFolder |
public GetFolder ( SpecialFolder folder ) : IMailFolder | ||
folder | SpecialFolder | The type of special folder. |
return | IMailFolder |
public GetFolder ( string path, |
||
path | string | The folder path. |
cancellationToken | The cancellation token. | |
return | IMailFolder |
public GetFolders ( FolderNamespace @namespace, StatusItems items = StatusItems.None, bool subscribedOnly = false, |
||
@namespace | FolderNamespace | |
items | StatusItems | The status items to pre-populate. |
subscribedOnly | bool | If set to |
cancellationToken | The cancellation token. | |
return | IList |
public GetMetadata ( MetadataOptions options, IEnumerable |
||
options | MetadataOptions | The metadata options. |
tags | IEnumerable |
The metadata tags. |
cancellationToken | The cancellation token. | |
return | MetadataCollection |
public GetMetadata ( MetadataTag tag, |
||
tag | MetadataTag | The metadata tag. |
cancellationToken | The cancellation token. | |
return | string |
public Identify ( MailKit.Net.Imap.ImapImplementation clientImplementation, |
||
clientImplementation | MailKit.Net.Imap.ImapImplementation | The client implementation. |
cancellationToken | The cancellation token. | |
return | MailKit.Net.Imap.ImapImplementation |
public IdentifyAsync ( MailKit.Net.Imap.ImapImplementation clientImplementation, |
||
clientImplementation | MailKit.Net.Imap.ImapImplementation | The client implementation. |
cancellationToken | The cancellation token. | |
return | Task |
public Idle ( |
||
doneToken | The cancellation token used to return to the non-idle state. | |
cancellationToken | The cancellation token. | |
return | void |
public IdleAsync ( |
||
doneToken | The cancellation token used to return to the non-idle state. | |
cancellationToken | The cancellation token. | |
return | System.Threading.Task |
public ImapClient ( IProtocolLogger protocolLogger ) : System | ||
protocolLogger | IProtocolLogger | The protocol logger. |
return | System |
public NoOp ( |
||
cancellationToken | The cancellation token. | |
return | void |
public Reconnect ( string password, |
||
password | string | The password. |
cancellationToken | The cancellation token. | |
return | void |
public ReconnectAsync ( string password, |
||
password | string | The password. |
cancellationToken | The cancellation token. | |
return | System.Threading.Task |
public SetMetadata ( MetadataCollection metadata, |
||
metadata | MetadataCollection | The metadata. |
cancellationToken | The cancellation token. | |
return | void |