The following tables list the members exposed by Imap.

      Public Constructors

      NameDescription
      Public ConstructorsImap ConstructorOverloaded. Initializes a new instance of the Imap class.
      Top

      Public Properties

      NameDescription
      Public PropertiesAbortTimeoutGets or sets a value, in milliseconds, indicating after what period of time a IMAP abort operation should timeout.
      Public PropertiesClearTextLoginDisabledReturns a value indicating whether the clear text login is disabled.
      Public PropertiesConfigGets or sets IMAP object settings.
      Public PropertiesEnabledFeaturesGets or sets the bit field specifying the enabled features.
      Public PropertiesEncodingGets or sets the Encoding that is used to encode commands sent to the server, and decode replies from the server.
      Public PropertiesInstanceIdGets instance ID (intended for logging purposes).
      Public PropertiesInvokeFromCurrentThreadsGets a value indicating whether to raise events from the current thread or to use a SynchronizationContext object available when an asynchronous operation was started. The default value is false.
      Public PropertiesIsAuthenticatedGets a boolean value indicating whether the session is authenticated. This is used to check whether the session has been automatically preauthenticated prior to calling the Authenticate method.
      Public PropertiesIsBusyGets a value indicating whether the component is performing a lengthy operation.
      Public PropertiesIsConnectedGets a boolean value indicating whether the connection has been established.
      Public PropertiesIsConnectionSecuredGets a boolean value indicating whether the current connection (if any) is secured with TLS/SSL layer.
      Public PropertiesLocalEndPointGets the local client EndPoint.
      Public PropertiesLogSourceGets or sets the source object for all log messages generated by this object. If not set, the property returns the current object.
      Public PropertiesProxyGets or sets the server proxy, if any, used to connect to the remote IMAP server.
      Public PropertiesRemoteEndPointGets the remote server EndPoint.
      Public PropertiesSecureSocketReturns the TLS/SSL socket of secured control connection.
      Public PropertiesServerNameGets the server name, if available.
      Public PropertiesServerPortGets the server port, if available.
      Public PropertiesStateGets the current state of the Imap object.
      Public PropertiesSupportedAuthenticationMethodsGets the list of supported authentication methods.
      Public PropertiesSupportedFeaturesGets the bit field specifying the features supported by the server.
      Public PropertiesTimeoutGets or sets a value, in milliseconds, indicating after what period of time an IMAP operation (sending commands, waiting for responses or time between data buffer transfers) should timeout.
      Virtual Public PropertiesTraceListenerManagerGets or sets the TraceListenerManager object to which the log messages generated by this object are sent. If not set, the Default trace listener manager is used. If this property is set to null, all messages from this object wont be logged.
      Virtual Public PropertiesTraceSourceGets or sets the source object for all log messages generated by this object. If not set, the property returns the current object.
      Public PropertiesUserNameGets the authenticated user name, if available.
      Public PropertiesWorkingFolderGets the currently selected Folder, or null reference (or Nothing in VB.NET) if no mailbox is selected.
      Top

      Public Fields

      NameDescription
      Public FieldsStatic MemberDefaultImplicitSslPortDefault IMAP/Implicit SSL port (993).
      Public FieldsStatic MemberDefaultPortDefault IMAP port (143).
      Top

      Public Methods

      NameDescription
      Public MethodsAuthenticateOverloaded. Authenticates the specified user to the remote IMAP server with the specified credentials.
      Public MethodsAuthenticateAsyncOverloaded. Asynchronously authenticates the user to the remote IMAP server using the specified authentication method that does not require credentials. Only NTLM, GSSAPI and External methods are supported.
      Public MethodsCancelCancels the current operation.
      Public MethodsCheckForUpdatesOverloaded. Sends NOOP or IDLE command to the server and checks for IMAP server notifications in the specified amount of time.
      Public MethodsCheckForUpdatesAsyncOverloaded. Asynchronously sends NOOP or IDLE command to the server and checks for IMAP server notifications in the specified amount of time.
      Public MethodsCheckSessionSends a small packet to the server to check whether the session is still alive. An exception is thrown if any error is found.
      Public MethodsConnectOverloaded. Connects to an IMAP4 server on the standard IMAP4 port (143).
      Public MethodsConnectAsyncOverloaded. Asynchronously connects to an IMAP4 server on the standard IMAP4 port (143).
      Public MethodsCopyMessageOverloaded. Copies messages from the current folder that belong to a specified message set to the specified folder.
      Public MethodsCopyMessageAsyncOverloaded. Asynchronously copies messages from the current folder that belong to a specified message set to the specified folder.
      Public MethodsCreateFolderCreates a folder with the specified name.
      Public MethodsCreateFolderAsyncOverloaded. Asynchronously creates a new folder in the IMAP4 account.
      Public MethodsDeleteFolderDeletes a folder with the specified name.
      Public MethodsDeleteFolderAsyncOverloaded. Asynchronously deletes a folder with the specified name.
      Public MethodsDeleteMessageOverloaded. Marks messages that belong to a specified message set as deleted.
      Public MethodsDeleteMessageAsyncOverloaded. Asynchronously marks the specified messages in the currently selected mailbox as deleted. To permanently delete messages, use the method Purge.
      Public MethodsDeselectOverloaded. Unselects the currently selected folder. Messages marked as deleted (with a Deleted flag) are not permanently removed. To remove them, use Deselect or Purge method.
      Public MethodsDeselectAsyncOverloaded. Asynchronously deselects the currently selected folder and optionally removes all messages marked as deleted (by using DeleteMessage) from the current folder. After calling this method, WorkingFolder will be null.
      Public MethodsDisconnectDisconnects from the IMAP server and returns exit message from the server.
      Public MethodsDisconnectAsyncOverloaded. Asynchronously disconnects from the IMAP server and returns exit message from the server.
      Public MethodsDisposeDisposes the Imap object and all the socket objects.
      Public MethodsDownloadImapMessageOverloaded. Gets information about a message with the specified sequence number.
      Public MethodsDownloadImapMessageAsyncOverloaded. Asynchronously gets information about a message with the specified sequence number.
      Public MethodsDownloadMailMessageOverloaded. Downloads the message with the specified sequence number and loads it into an instance of MailMessage.
      Public MethodsDownloadMailMessageAsyncOverloaded. Asynchronously downloads the message with the specified sequence number and loads it into an instance of MailMessage.
      Public MethodsDownloadMessageOverloaded. Downloads the message with the specified sequence number and writes its data into a supplied stream.
      Public MethodsDownloadMessageAsyncOverloaded. Asynchronously downloads the message with the specified inbox index number and writes its data into a supplied stream.
      Public MethodsDownloadMessageHeadersOverloaded. Downloads the headers of a message with the specified sequence number and writes it into a supplied stream.
      Public MethodsDownloadMessageHeadersAsyncOverloaded. Asynchronously downloads the headers of a message with the specified sequence number and writes it into a supplied stream.
      Public MethodsDownloadMessagePartOverloaded. Downloads the specified part of the message. Used to download separate attachments. Call DownloadImapMessage with ImapEnvelopeParts.MessageStructure argument to download the list of sections and access it using GetParts method.
      Public MethodsDownloadMessagePartAsyncOverloaded. Asynchronously downloads the specified part of the message into the specified stream. Used to download separate attachments. Call DownloadImapMessage with MessageStructure argument to download the list of sections and access it using GetParts method.
      Public MethodsDownloadMimeMessageOverloaded. Downloads the message with the specified sequence number and loads it into an instance of MimeMessage.
      Public MethodsDownloadMimeMessageAsyncOverloaded. Asynchronously downloads the message with the specified sequence number and loads it into an instance of MimeMessage.
      Public MethodsFlagOverloaded. Modifies the flags of messages in the current folder that belong to a specified message set.
      Public MethodsFlagAsyncOverloaded. Asynchronously modifies the flags of messages in the current folder that belong to a specified message set.
      Public MethodsFolderExistsDetects whether the specified folder exists on the server. Not all IMAP servers support this!
      Public MethodsFolderExistsAsyncOverloaded. Asynchronously determines whether the specified folder exists on the server.
      Public MethodsGetFolderInfoReturns information about the specified folder without selecting it.
      Public MethodsGetFolderInfoAsyncOverloaded. Asynchronously gets folder information without selecting it. Only TotalMessages, RecentMessages, NotSeenMessages, UidValidity, and UidNext properties of the Folder class are available after calling this method.
      Public MethodsGetSessionStatusChecks whether the IMAP session is still connected and returns its state.
      Public MethodsGetSupportedAuthenticationMethodsGets the list of supported authentication methods.
      Public MethodsListFoldersOverloaded. Gets the list of root subfolders.
      Public MethodsListFoldersAsyncOverloaded. Asynchronously gets the list of sub-mailboxes in the specified folder.
      Public MethodsListMessagesOverloaded. Gets the list of messages in the current folder.
      Public MethodsListMessagesAsyncOverloaded. Asynchronously searches the current folder for messages that match the specified searching criteria and fetches message envelopes, bodies, headers, flags, attributes, and other message-related information from the server.
      Public MethodsMoveMessageOverloaded. Moves a message with the specified sequence number from the current mailbox to another mailbox.
      Public MethodsMoveMessageAsyncOverloaded. Asynchronously moves the specified messages from the currently selected mailbox to the specified mailbox.
      Public MethodsPurgeOverloaded. Permanently removes all messages marked as deleted (with a Deleted flag) from the current folder.
      Public MethodsPurgeAsyncOverloaded. Asynchronously permanently removes all the messages marked as deleted in the specified list from the currently selected mailbox.
      Public MethodsReadResponseReturns the corresponding response of the IMAP server to the command that was sent using the SendCommand method.
      Public MethodsReadResponseAsyncOverloaded. Asynchronously returns the response of the IMAP server to the command.
      Public MethodsRenameFolderRenames a specified folder to a new name.
      Public MethodsRenameFolderAsyncOverloaded. Asynchronously renames a specified folder to a new name.
      Public MethodsSelectOverloaded. Selects the specified folder so that its messages can be accessed.
      Public MethodsSelectAsyncOverloaded. Asynchronously selects the specified folder so that its messages can be accessed.
      Public MethodsSendCommandSends user-defined command to the server.
      Public MethodsSendCommandAsyncOverloaded. Asynchronously executes a command on the IMAP server.
      Public MethodsSetMailboxCheckpointRequests a checkpoint of the currently selected mailbox. mailbox.
      Public MethodsSetMailboxCheckpointAsyncOverloaded. Asynchronously requests a checkpoint of the currently selected mailbox.
      Public MethodsSetSocketFactorySets the socket factory to be used to create communication sockets.
      Public MethodsSubscribeSubscribes to a specified folder, adding it to a list of active folders that appear in the folder listings with subscribedOnly parameter set to true.
      Public MethodsSubscribeAsyncOverloaded. Asynchronously subscribes to the specified folder of the IMAP4 account, adding it to a list of active folders that appear in the folder listings with subscribedOnly parameter set to true.
      Public MethodsToStringOverridden. Returns a string representation of this object.
      Public MethodsUndeleteMessageOverloaded. Marks all messages as not deleted.
      Public MethodsUndeleteMessageAsyncOverloaded. Asynchronously marks messages that belong to a specified message set as not deleted. It has no effect on messages were purged using the Purge method.
      Public MethodsUnsubscribeUnsubscribes from a specified folder, removing it to a list of active folders that appear in the folder listings with subscribedOnly parameter set to true.
      Public MethodsUnsubscribeAsyncOverloaded. Asynchronously unsubscribes the previously subscribed folder (using the Subscribe method) of the IMAP4 account, removing it from the list of active folders that appear in the folder listings with subscribedOnly parameter set to true.
      Public MethodsUpgradeConnectionSecures the connection with TLS/SSL using default parameters.
      Public MethodsUpgradeConnectionAsyncOverloaded. Asynchronously secures the connection with TLS/SSL using default parameters.
      Public MethodsUploadMessageOverloaded. Uploads the message to the specified folder.
      Public MethodsUploadMessageAsyncOverloaded. Asynchronously uploads the message read from a local file and sets its flags.
      Public MethodsUploadRawMessageOverloaded. Uploads the contents of the stream to the specified folder and sets its flags and date.
      Public MethodsUploadRawMessageAsyncOverloaded. Asynchronously uploads a mail message inside the specified data stream to the specified folder, assigns the specified date and flags to this message.
      Top

      Protected Methods

      NameDescription
      Virtual Protected MethodsDisposeReleases the unmanaged resources used by the Imap and optionally releases the managed resources.
      Virtual Protected MethodsOnAuthenticateCompletedRaises the AuthenticateCompleted event.
      Virtual Protected MethodsOnCertificateReceivedRaises the CertificateReceived event.
      Virtual Protected MethodsOnCertificateRequiredRaises the CertificateRequired event.
      Virtual Protected MethodsOnCheckForUpdatesCompletedRaises the CheckForUpdatesCompleted event.
      Virtual Protected MethodsOnCommandResponseRaises the CommandResponse event.
      Virtual Protected MethodsOnConnectCompletedRaises the ConnectCompleted event.
      Virtual Protected MethodsOnCopyMessageCompletedRaises the CopyMessageCompleted event.
      Virtual Protected MethodsOnCreateFolderCompletedRaises the CreateFolderCompleted event.
      Virtual Protected MethodsOnDeleteFolderCompletedRaises the DeleteFolderCompleted event.
      Virtual Protected MethodsOnDeleteMessageCompletedRaises the DeleteMessageCompleted event.
      Virtual Protected MethodsOnDeselectCompletedRaises the DeselectCompleted event.
      Virtual Protected MethodsOnDisconnectCompletedRaises the DisconnectCompleted event.
      Virtual Protected MethodsOnDownloadImapMessageCompletedRaises the DownloadImapMessageCompleted event.
      Virtual Protected MethodsOnDownloadMailMessageCompletedRaises the DownloadMailMessageCompleted event.
      Virtual Protected MethodsOnDownloadMessageCompletedRaises the DownloadMessageCompleted event.
      Virtual Protected MethodsOnDownloadMessageHeadersCompletedRaises the DownloadMessageHeadersCompleted event.
      Virtual Protected MethodsOnDownloadMessagePartCompletedRaises the DownloadMessagePartCompleted event.
      Virtual Protected MethodsOnDownloadMimeMessageCompletedRaises the DownloadMimeMessageCompleted event.
      Virtual Protected MethodsOnFlagCompletedRaises the FlagCompleted event.
      Virtual Protected MethodsOnFolderExistsCompletedRaises the FolderExistsCompleted event.
      Virtual Protected MethodsOnGetFolderInfoCompletedRaises the GetFolderInfoCompleted event.
      Virtual Protected MethodsOnListFoldersCompletedRaises the ListFoldersCompleted event.
      Virtual Protected MethodsOnListMessagesCompletedRaises the ListMessagesCompleted event.
      Virtual Protected MethodsOnListProcessingRaises the ListProcessing event.
      Virtual Protected MethodsOnMoveMessageCompletedRaises the MoveMessageCompleted event.
      Virtual Protected MethodsOnProgressRaises the StateChanged event.
      Virtual Protected MethodsOnPurgeCompletedRaises the PurgeCompleted event.
      Virtual Protected MethodsOnReadResponseCompletedRaises the ReadResponseCompleted event.
      Virtual Protected MethodsOnRenameFolderCompletedRaises the RenameFolderCompleted event.
      Virtual Protected MethodsOnSelectCompletedRaises the SelectCompleted event.
      Virtual Protected MethodsOnSendCommandCompletedRaises the SendCommandCompleted event.
      Virtual Protected MethodsOnSetMailboxCheckpointCompletedRaises the SetMailboxCheckpointCompleted event.
      Virtual Protected MethodsOnStateChangedRaises the StateChanged event.
      Virtual Protected MethodsOnSubscribeCompletedRaises the SubscribeCompleted event.
      Virtual Protected MethodsOnUndeleteMessageCompletedRaises the UndeleteMessageCompleted event.
      Virtual Protected MethodsOnUnsubscribeCompletedRaises the UnsubscribeCompleted event.
      Virtual Protected MethodsOnUpdateRaises the Update event.
      Virtual Protected MethodsOnUpgradeConnectionCompletedRaises the UpgradeConnectionCompleted event.
      Virtual Protected MethodsOnUploadMessageCompletedRaises the UploadMessageCompleted event.
      Virtual Protected MethodsOnUploadRawMessageCompletedRaises the UploadRawMessageCompleted event.
      Top

      Public Events

      NameDescription
      Public EventsAuthenticateCompletedOccurs when an asynchronous authentication operation completes.
      Public EventsCertificateReceivedOccurs when an IMAP server's certificate was received and verified.
      Public EventsCertificateRequiredOccurs when a client certificate is required by the IMAP server, or the one provided was not accepted.
      Public EventsCheckForUpdatesCompletedOccurs when an asynchronous CheckForUpdatesAsync operation completes.
      Public EventsCommandResponseOccurs when a command has been sent to or a response is received from the server.
      Public EventsConnectCompletedOccurs when an asynchronous ConnectAsync operation completes.
      Public EventsCopyMessageCompletedOccurs when an asynchronous CopyMessageAsync operation completes.
      Public EventsCreateFolderCompletedOccurs when an asynchronous CreateFolderAsync operation completes.
      Public EventsDeleteFolderCompletedOccurs when an asynchronous DeleteFolderAsync operation completes.
      Public EventsDeleteMessageCompletedOccurs when an asynchronous DeleteMessageAsync operation completes.
      Public EventsDeselectCompletedOccurs when an asynchronous DeselectAsync operation completes.
      Public EventsDisconnectCompletedOccurs when an asynchronous DisconnectAsync operation completes.
      Public EventsDownloadImapMessageCompletedOccurs when an asynchronous DownloadImapMessageAsync operation completes.
      Public EventsDownloadMailMessageCompletedOccurs when an asynchronous DownloadMailMessageAsync operation completes.
      Public EventsDownloadMessageCompletedOccurs when an asynchronous DownloadMessageAsync operation completes.
      Public EventsDownloadMessageHeadersCompletedOccurs when an asynchronous DownloadMessageHeadersAsync operation completes.
      Public EventsDownloadMessagePartCompletedOccurs when an asynchronous DownloadMessagePartAsync operation completes.
      Public EventsDownloadMimeMessageCompletedOccurs when an asynchronous DownloadMimeMessageAsync operation completes.
      Public EventsFlagCompletedOccurs when an asynchronous FlagAsync operation completes.
      Public EventsFolderExistsCompletedOccurs when an asynchronous FolderExistsAsync operation completes.
      Public EventsGetFolderInfoCompletedOccurs when an asynchronous GetFolderInfoAsync operation completes.
      Public EventsListFoldersCompletedOccurs when an asynchronous ListFoldersAsync operation completes.
      Public EventsListMessagesCompletedOccurs when an asynchronous ListMessagesAsync operation completes.
      Public EventsListProcessingOccurs when a response line from the IMAP server is processed.
      Public EventsMoveMessageCompletedOccurs when an asynchronous MoveMessageAsync operation completes.
      Public EventsProgressOccurs when data is send or received.
      Public EventsPurgeCompletedOccurs when an asynchronous PurgeAsync operation completes.
      Public EventsReadResponseCompletedOccurs when an asynchronous ReadResponseAsync operation completes.
      Public EventsRenameFolderCompletedOccurs when an asynchronous RenameFolderAsync operation completes.
      Public EventsSelectCompletedOccurs when an asynchronous SelectAsync operation completes.
      Public EventsSendCommandCompletedOccurs when an asynchronous SendCommandAsync operation completes.
      Public EventsSetMailboxCheckpointCompletedOccurs when an asynchronous SetMailboxCheckpointAsync operation completes.
      Public EventsStateChangedOccurs when the state of the Imap object is changed.
      Public EventsSubscribeCompletedOccurs when an asynchronous SubscribeAsync operation completes.
      Public EventsUndeleteMessageCompletedOccurs when an asynchronous UndeleteMessageAsync operation completes.
      Public EventsUnsubscribeCompletedOccurs when an asynchronous UnsubscribeAsync operation completes.
      Public EventsUpdateOccurs when a notification message is received.
      Public EventsUpgradeConnectionCompletedOccurs when an asynchronous UpgradeConnectionAsync operation completes.
      Public EventsUploadMessageCompletedOccurs when an asynchronous UploadMessageAsync operation completes.
      Public EventsUploadRawMessageCompletedOccurs when an asynchronous UploadRawMessageAsync operation completes.
      Top

      See Also