Imap Class
Namespace: Rebex.Net
Assembly: Rebex.Imap.dll (version 7.0.9147)
Provides methods for communication with IMAP servers. Supported IMAP versions are IMAP4 and IMAP4rev1.
Syntax
public class Imap : NetworkSession, ILogWriterProvider, IDisposable
Inherited Members
Remarks
All members of this class are thread-safe.
Constructors
Name | Description |
---|---|
Imap() | Initializes a new instance of the Imap class. |
Fields
Name | Description |
---|---|
Default |
Default IMAP/Implicit SSL port (993). |
Default |
Default IMAP port (143). |
Properties
Name | Description |
---|---|
Abort |
Gets or sets the length of time before the abort operation times out. |
Clear |
Returns a value indicating whether the clear text login is disabled. Either use one of the more secure authentication methods, or upgrade to TLS/SSL if you wish to perform clear text login. |
Current |
Gets the Imap |
Default |
Gets or sets a default log writer used by all new instances of Network |
Enabled |
Gets or sets the bit field specifying the enabled extensions. |
Encoding | Gets or sets the Encoding to use to encode and decode command parameters and server responses. |
Instance |
Gets instance ID (intended for logging purposes).
Inherited from Network |
Is |
Returns a value indicating whether the session is authenticated. |
Is |
Gets a value indicating whether there is any operation (method) in progress. |
Is |
Gets a value indicating whether the session is connected. |
Is |
Gets the value indicating whether the control connection is secured. |
Local |
Gets the local client End |
Log |
Gets or sets the Log |
Proxy | Gets or sets the network proxy to use to access a remote server. |
Remote |
Gets the remote server End |
Server |
Gets the server name, if available.
Inherited from Network |
Server |
Gets the server port, if available.
Inherited from Network |
Settings | Gets or sets IMAP object settings. |
State | Gets the current state of the Imap object. |
Supported |
Gets the bit field specifying the extensions supported by the server. |
Timeout | Gets 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). |
Tls |
Returns the TLS/SSL socket of secured control connection. |
User |
Gets the authenticated user name, if available.
Inherited from Network |
Version | Returns the version of the SMTP component. |
Methods
Name | Description |
---|---|
Abort() | Aborts the current operation. |
Check |
Checks whether the IMAP session is still connected. Throws an exception on error. |
Check |
Processes server notifications. |
Check |
Processes server notifications for the specified amount of time. |
Check |
Begins asynchronous CheckForUpdates operation. Processes server notifications for the specified amount of time. |
Check |
Begins asynchronous CheckForUpdates operation. Processes server notifications. |
Connect(String) | Connects to the IMAP server. |
Connect(String, Ssl |
Connects to the IMAP server. Use a port corresponding to the specified security mode. |
Connect(String, Int32) | Connects to the IMAP server. |
Connect(String, Int32, Ssl |
Connects to the IMAP server. |
Connect |
Begins asynchronous Connect operation. Connects to the IMAP server. Use a port corresponding to the specified security mode. |
Connect |
Begins asynchronous Connect operation. Connects to the IMAP server. |
Connect |
Begins asynchronous Connect operation. Connects to the IMAP server. |
Connect |
Begins asynchronous Connect operation. Connects to the IMAP server. |
Copy |
Copies messages from the current folder that belong to a specified message set to the specified folder. |
Copy |
Copies a message with the specified sequence number to the specified folder. |
Copy |
Copies a message with the specified unique ID to the specified folder. |
Copy |
Begins asynchronous CopyMessage operation. Copies messages from the current folder that belong to a specified message set to the specified folder. |
Copy |
Begins asynchronous CopyMessage operation. Copies a message with the specified sequence number to the specified folder. |
Copy |
Begins asynchronous CopyMessage operation. Copies a message with the specified unique ID to the specified folder. |
Create |
Creates a folder with the specified name. |
Create |
Begins asynchronous CreateFolder operation. Creates a folder with the specified name. |
Delete |
Deletes a folder with the specified name. |
Delete |
Begins asynchronous DeleteFolder operation. Deletes a folder with the specified name. |
Delete |
Marks messages that belong to a specified message set as deleted. |
Delete |
Marks a message with the specified sequence number as deleted. |
Delete |
Marks a message with the specified unique ID as deleted. |
Delete |
Begins asynchronous DeleteMessage operation. Marks messages that belong to a specified message set as deleted. |
Delete |
Begins asynchronous DeleteMessage operation. Marks a message with the specified sequence number as deleted. |
Delete |
Begins asynchronous DeleteMessage operation. Marks a message with the specified unique ID as deleted. |
Disconnect() | Disconnects from the IMAP server. |
Disconnect |
Begins asynchronous Disconnect operation. Disconnects from the IMAP server. |
Dispose() | Disposes the Imap object and all the socket objects. |
Dispose(Boolean) | Releases the unmanaged resources used by the Imap and optionally releases the managed resources. |
Finalize() | Finalizer. Called by garbage collector during object destruction. |
Folder |
Detects whether the specified folder exists on the server. Not all IMAP servers support this! |
Folder |
Begins asynchronous FolderExists operation. Detects whether the specified folder exists on the server. Not all IMAP servers support this! |
Get |
Checks whether the IMAP session is still connected and returns its state. |
Get |
Returns information about the specified folder without selecting it. |
Get |
Begins asynchronous GetFolderInfo operation. Returns information about the specified folder without selecting it. |
Get |
Gets the list of root subfolders. |
Get |
Gets the list of subfolders in the specified folder. |
Get |
Gets the list of subfolders in the specified folder. |
Get |
Gets the list of subfolders in the specified folder. |
Get |
Begins asynchronous GetFolderList operation. Gets the list of subfolders in the specified folder. |
Get |
Gets hash code for this object.
Inherited from Network |
Get |
Downloads the message with the specified sequence number
and loads it into an instance of Mail |
Get |
Downloads the message with the specified unique ID
and loads it into an instance of Mail |
Get |
Begins asynchronous GetMailMessage operation.
Downloads the message with the specified sequence number
and loads it into an instance of Mail |
Get |
Begins asynchronous GetMailMessage operation.
Downloads the message with the specified unique ID
and loads it into an instance of Mail |
Get |
Downloads the message with the specified sequence number and writes its data into a supplied stream. |
Get |
Downloads the specified part of the message with the specified sequence number and writes its data into a supplied stream. |
Get |
Downloads the message with the specified sequence number and writes its data into a local file. |
Get |
Downloads the message with the specified sequence number and writes its data into a local file. |
Get |
Downloads the message with the specified unique ID and writes its data into a supplied stream. |
Get |
Downloads the specified part of the message with the specified unique ID and writes its data into a supplied stream. |
Get |
Downloads the message with the specified unique ID and writes its data into a local file. |
Get |
Downloads the message with the specified unique ID and writes its data into a local file. |
Get |
Begins asynchronous GetMessage operation. Downloads the specified part of the message with the specified sequence number and writes its data into a supplied stream. |
Get |
Begins asynchronous GetMessage operation. Downloads the message with the specified sequence number and writes its data into a supplied stream. |
Get |
Begins asynchronous GetMessage operation. Downloads the message with the specified sequence number and writes its data into a local file. |
Get |
Begins asynchronous GetMessage operation. Downloads the message with the specified sequence number and writes its data into a local file. |
Get |
Begins asynchronous GetMessage operation. Downloads the specified part of the message with the specified unique ID and writes its data into a supplied stream. |
Get |
Begins asynchronous GetMessage operation. Downloads the message with the specified unique ID and writes its data into a supplied stream. |
Get |
Begins asynchronous GetMessage operation. Downloads the message with the specified unique ID and writes its data into a local file. |
Get |
Begins asynchronous GetMessage operation. Downloads the message with the specified unique ID and writes its data into a local file. |
Get |
Downloads the headers of a message with the specified sequence number and writes it into a supplied stream. |
Get |
Downloads the headers of a message with the specified unique ID and writes it into a supplied stream. |
Get |
Begins asynchronous GetMessageHeaders operation. Downloads the headers of a message with the specified sequence number and writes it into a supplied stream. |
Get |
Begins asynchronous GetMessageHeaders operation. Downloads the headers of a message with the specified unique ID and writes it into a supplied stream. |
Get |
Gets information about a message with the specified sequence number. |
Get |
Gets information about a message with the specified unique ID |
Get |
Begins asynchronous GetMessageInfo operation. Gets information about a message with the specified sequence number. |
Get |
Begins asynchronous GetMessageInfo operation. Gets information about a message with the specified unique ID |
Get |
Gets the list of messages in the current folder. |
Get |
Gets the list of messages in the current folder. |
Get |
Gets the list of messages in the current folder that belong to a specified message set. |
Get |
Gets the list of messages in the current folder that belong to a specified message set. |
Get |
Gets the list of messages in the current folder that belong to a specified message set. |
Get |
Begins asynchronous GetMessageList operation. Gets the list of messages in the current folder. |
Get |
Begins asynchronous GetMessageList operation. Gets the list of messages in the current folder that belong to a specified message set. |
Get |
Begins asynchronous GetMessageList operation. Gets the list of messages in the current folder that belong to a specified message set. |
Get |
Downloads the specified part of the message. Used to download separate attachments.
Call Get |
Get |
Downloads the specified part of the message into the specified stream. Used to download separate attachments.
Call Get |
Get |
Downloads the specified part of the message. Used to download separate attachments.
Call Get |
Get |
Downloads the specified part of the message into the specified stream. Used to download separate attachments.
Call Get |
Get |
Begins asynchronous GetMessagePart operation.
Downloads the specified part of the message into the specified stream. Used to download separate attachments.
Call Get |
Get |
Begins asynchronous GetMessagePart operation.
Downloads the specified part of the message. Used to download separate attachments.
Call Get |
Get |
Begins asynchronous GetMessagePart operation.
Downloads the specified part of the message into the specified stream. Used to download separate attachments.
Call Get |
Get |
Begins asynchronous GetMessagePart operation.
Downloads the specified part of the message. Used to download separate attachments.
Call Get |
GetMessages(ImapMessageSet, ImapListFields, Action<ImapMessage>) | Downloads messages in the current folder that belong to a specified message set. |
GetMessages(ImapMessageSet, Action<ImapMessage>) | Downloads messages in the current folder that belong to a specified message set. |
GetMessagesAsync(ImapMessageSet, ImapListFields, Action<ImapMessage>, Object) | Begins asynchronous GetMessages operation. Downloads messages in the current folder that belong to a specified message set. |
Get |
Downloads the message with the specified sequence number
and loads it into an instance of Mime |
Get |
Downloads the message with the specified unique ID
and loads it into an instance of Mime |
Get |
Begins asynchronous GetMimeMessage operation.
Downloads the message with the specified sequence number
and loads it into an instance of Mime |
Get |
Begins asynchronous GetMimeMessage operation.
Downloads the message with the specified unique ID
and loads it into an instance of Mime |
Get |
Gets the list of supported authentication methods. |
Login(Gss |
Authenticates the user to the IMAP server using the specified GSSAPI provider. Only supported on Windows and partially on Mono. |
Login(Imap |
Authenticates the user to the IMAP server using the specified authentication method that does not require credentials (NTLM, GSSAPI or EXTERNAL). Only supported on Windows. |
Login(String, Imap |
Authenticates the user to the IMAP server using an OAuth token. |
Login(String, String) | Authenticates the user to the IMAP server using the specified authentication method. |
Login(String, String, Imap |
Authenticates the user to the IMAP server using the specified authentication method. |
Login |
Begins asynchronous Login operation. Authenticates the user to the IMAP server using the specified GSSAPI provider. Only supported on Windows and partially on Mono. |
Login |
Begins asynchronous Login operation. Authenticates the user to the IMAP server using the specified authentication method that does not require credentials (NTLM, GSSAPI or EXTERNAL). Only supported on Windows. |
Login |
Begins asynchronous Login operation. Authenticates the user to the IMAP server using an OAuth token. |
Login |
Begins asynchronous Login operation. Authenticates the user to the IMAP server using the specified authentication method. |
Login |
Begins asynchronous Login operation. Authenticates the user to the IMAP server using the specified authentication method. |
On |
Raises the Command |
On |
Raises the Notification event. |
On |
Raises the Response |
On |
Raises the State |
On |
Raises the Transfer |
Purge() | Permanently removes all messages marked as deleted (with a Deleted flag) from the current folder. |
Purge(Imap |
Permanently removes all messages marked as deleted (with a Deleted flag) from the current folder. |
Purge |
Begins asynchronous Purge operation. Permanently removes all messages marked as deleted (with a Deleted flag) from the current folder. |
Purge |
Begins asynchronous Purge operation. Permanently removes all messages marked as deleted (with a Deleted flag) from the current folder. |
Read |
Returns the response of the IMAP server to the command. |
Read |
Begins asynchronous ReadResponse operation. Returns the response of the IMAP server to the command. |
Rename |
Renames a specified folder to a new name. |
Rename |
Begins asynchronous RenameFolder operation. Renames a specified folder to a new name. |
Request |
Requests a checkpoint of the currently selected mailbox. mailbox. |
Request |
Begins asynchronous RequestCheckpoint operation. Requests a checkpoint of the currently selected mailbox. mailbox. |
Search(Imap |
Search the current folder for messages that match the specified searching criteria. |
Search(Imap |
Search the current folder for messages that match the specified searching criteria. |
Search(Imap |
Search the current folder for messages that match the specified searching criteria. |
Search(Imap |
Search the current folder for messages that match the specified searching criteria. |
Search |
Begins asynchronous Search operation. Search the current folder for messages that match the specified searching criteria. |
Search |
Begins asynchronous Search operation. Search the current folder for messages that match the specified searching criteria. |
Search |
Begins asynchronous Search operation. Search the current folder for messages that match the specified searching criteria. |
Secure() | Secures the connection with TLS/SSL using default parameters. |
Secure |
Begins asynchronous Secure operation. Secures the connection with TLS/SSL using default parameters. |
Select |
Selects the specified folder so that its messages can be accessed. |
Select |
Selects the specified folder so that its messages can be accessed. |
Select |
Begins asynchronous SelectFolder operation. Selects the specified folder so that its messages can be accessed. |
Send |
Executes a command on the IMAP server. |
Send |
Begins asynchronous SendCommand operation. Executes a command on the IMAP server. |
Set |
Modifies the flags of messages in the current folder that belong to a specified message set. |
Set |
Modifies the flags of messages in the current folder that belong to a specified message set. |
Set |
Modifies the flags of a message with the specified sequence number. |
Set |
Modifies the flags of a message with the specified sequence number. |
Set |
Modifies the flags of a message with the specified unique ID. |
Set |
Modifies the flags of a message with the specified unique ID. |
Set |
Begins asynchronous SetMessageFlags operation. Modifies the flags of messages in the current folder that belong to a specified message set. |
Set |
Begins asynchronous SetMessageFlags operation. Modifies the flags of a message with the specified sequence number. |
Set |
Begins asynchronous SetMessageFlags operation. Modifies the flags of a message with the specified unique ID. |
Set |
Sets the socket factory to be used to create communication sockets. |
Store |
Uploads the message to the specified folder. |
Store |
Uploads the message to the specified folder and sets its flags. |
Store |
Uploads the message to the specified folder and sets its flags. |
Store |
Uploads the message to the specified folder. |
Store |
Uploads the message to the specified folder and sets its flags. |
Store |
Uploads the message to the specified folder and sets its flags. |
Store |
Uploads the message read from the stream to the specified folder and sets its flags. |
Store |
Uploads the message read from the stream to the specified folder and sets its flags. |
Store |
Uploads the message read from the stream to the specified folder and sets its flags. |
Store |
Uploads the message read from a local file and sets its flags. |
Store |
Uploads the message read from a local file and sets its flags. |
Store |
Uploads the message read from a local file and sets its flags. |
Store |
Uploads the message to the specified folder and sets its flags. |
Store |
Uploads the message to the specified folder and sets its flags. |
Store |
Uploads the message to the specified folder and sets its flags. |
Store |
Begins asynchronous StoreMessage operation. Uploads the message to the specified folder and sets its flags. |
Store |
Begins asynchronous StoreMessage operation. Uploads the message to the specified folder and sets its flags. |
Store |
Begins asynchronous StoreMessage operation. Uploads the message to the specified folder and sets its flags. |
Store |
Begins asynchronous StoreMessage operation. Uploads the message read from the stream to the specified folder and sets its flags. |
Store |
Begins asynchronous StoreMessage operation. Uploads the message read from a local file and sets its flags. |
Store |
Begins asynchronous StoreMessage operation. Uploads the message to the specified folder and sets its flags. |
Store |
Uploads the contents of the stream to the specified folder and sets its flags and date. |
Store |
Uploads the contents of the stream to the specified folder and sets its flags and date. |
Store |
Begins asynchronous StoreRawMessage operation. Uploads the contents of the stream to the specified folder and sets its flags and date. |
Subscribe(String) | Subscribes to a specified folder, adding it to a list of active folders that
appear in the folder listings with Imap |
Subscribe |
Begins asynchronous Subscribe operation.
Subscribes to a specified folder, adding it to a list of active folders that
appear in the folder listings with Imap |
To |
Returns a string representation of this object. |
Undelete |
Marks all messages as not deleted. |
Undelete |
Marks messages that belong to a specified message set as not deleted. |
Undelete |
Marks a message with the specified sequence number as not deleted. |
Undelete |
Marks a message with the specified unique ID as not deleted. |
Undelete |
Begins asynchronous UndeleteMessage operation. Marks messages that belong to a specified message set as not deleted. |
Undelete |
Begins asynchronous UndeleteMessage operation. Marks a message with the specified sequence number as not deleted. |
Undelete |
Begins asynchronous UndeleteMessage operation. Marks a message with the specified unique ID as not deleted. |
Unselect |
Unselects the currently selected folder.
Messages marked as deleted (with a Deleted flag) are not permanently removed.
To remove them, use Unselect |
Unselect |
Unselects the currently selected folder and optionally permanently removes all messages marked as deleted (with a Deleted flag) from the current folder. |
Unselect |
Begins asynchronous UnselectFolder operation. Unselects the currently selected folder and optionally permanently removes all messages marked as deleted (with a Deleted flag) from the current folder. |
Unselect |
Begins asynchronous UnselectFolder operation.
Unselects the currently selected folder.
Messages marked as deleted (with a Deleted flag) are not permanently removed.
To remove them, use Unselect |
Unsubscribe(String) | Unsubscribes from a specified folder, removing it to a list of active folders that
appear in the folder listings with Imap |
Unsubscribe |
Begins asynchronous Unsubscribe operation.
Unsubscribes from a specified folder, removing it to a list of active folders that
appear in the folder listings with Imap |
Events
Name | Description |
---|---|
Command |
Occurs when a command is send to the server. |
Notification | Occurs when a notification is received from the server. By sending notifications, the server informs connected clients about specific actions performed by either this client, by another connected session, or the server itself. |
Response |
Occurs when a response is received from the server. |
State |
Occurs when the state of the Imap object is changed. |
Transfer |
Occurs when data is send or received. |
Validating |
Occurs when a server certificate needs to be validated. |