The Imap type exposes the following members.

Methods

  NameDescription
Public methodAttach(Socket)
Attaches client to specified socket.
(Inherited from TcpTextClient.)
Public methodAttach(Socket, Boolean)
Attaches client to specified socket.
(Inherited from TcpTextClient.)
Public methodAttachSSL
Attaches client to specified socket.
(Inherited from TcpTextClient.)
Public methodCapability
Sends CAPABILITY command.
Public methodClose()()()()
Issues quit command (CloseCommand()()()() method), closes the connection, disposes the object.
(Inherited from TcpTextClient.)
Public methodClose(Boolean)
Issues quit command (CloseCommand()()()() method) and closes the connection.
(Inherited from TcpTextClient.)
Protected methodCloseCommand
Sends the LOGOUT command.
(Overrides TcpTextClient..::..CloseCommand()()()().)
Public methodCloseCurrentFolder
Issues CLOSE command to the server. Unless Examine was used to open folder, CLOSE command permanently removes all messages that have the Deleted flag set from the currently selected folder, and returns to the authenticated state from the selected state (no folder is selected).
Public methodConnect(String)
Connects to IMAP server on port 143. Use ConnectSSL(String) when SSL connection is needed.
Public methodConnect(IPEndPoint, Boolean)
Connects to server.
(Inherited from TcpTextClient.)
Public methodConnect(String, Int32)
Connects to server. Use ConnectSSL(String, Int32) when SSL connection is needed.
(Inherited from TcpTextClient.)
Public methodConnect(IPAddress, Int32, Boolean)
Connects to server.
(Inherited from TcpTextClient.)
Public methodConnect(String, Int32, Boolean)
Connects to server.
(Inherited from TcpTextClient.)
Public methodConnectSSL(String)
Connects to IMAP server using SSL on port 993.
Public methodConnectSSL(String, Int32)
Connects to server using SSL.
(Inherited from TcpTextClient.)
Public methodCopy(List<(Of <<'(Int64>)>>), FolderInfo)
Copies the specified messages to the specified destination folder (mailbox).
Public methodCopy(List<(Of <<'(Int64>)>>), String)
Copies the specified messages to the specified destination folder (mailbox).
Public methodCopy(Int64, FolderInfo)
Copies the specified message to the specified destination folder (mailbox).
Public methodCopy(Int64, String)
Copies the specified message to the specified destination folder (mailbox).
Public methodCopyByUID(List<(Of <<'(Int64>)>>), FolderInfo)
Copies the specified messages to the specified destination folder (mailbox).
Public methodCopyByUID(List<(Of <<'(Int64>)>>), String)
Copies the specified messages to the specified destination folder (mailbox).
Public methodCopyByUID(Int64, FolderInfo)
Copies the specified message to the specified destination folder (mailbox).
Public methodCopyByUID(Int64, String)
Copies the specified message to the specified destination folder (mailbox).
Public methodCreateFolder
Creates a folder (mailbox) with the given name.
Public methodDeleteFolder
Permanently removes a folder (mailbox) with the given name.
Public methodDeleteMessage(List<(Of <<'(Int64>)>>))
Deletes messages specified by the messageNumbers. Issues EXPUNGE command after.
Public methodDeleteMessage(Int64)
Deletes message specified by the messageNumber. Issues EXPUNGE command after.
Public methodDeleteMessageByUID(List<(Of <<'(Int64>)>>))
Deletes message specified by the uids. Issues EXPUNGE command after.
Public methodDeleteMessageByUID(Int64)
Deletes message specified by the uid. Issues EXPUNGE command after.
Public methodDispose
Releases all resources acquired by this object. Closes connection, without issuing any quit commands.
(Inherited from TcpTextClient.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodExamine(String)
Selects specified folder (mailbox) as the current read-only folder so that messages inside can be accessed. Examine command will not reset the Recent flag
Public methodExamine(FolderInfo)
Selects specified folder (mailbox) as the current read-only folder so that messages inside can be accessed. Examine command will not reset the Recent flag.
Public methodExamineInbox
Selects 'INBOX' as a current read-only folder (mailbox) so that messages inside can be accessed. Examine command will not reset the Recent flag
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFlagMessage(List<(Of <<'(Int64>)>>), Flag)
Flags the messages with specified flag.
Public methodFlagMessage(Int64, Flag)
Flags the message with specified flag.
Public methodFlagMessageByUID(List<(Of <<'(Int64>)>>), Flag)
Flags the messages with specified flag.
Public methodFlagMessageByUID(Int64, Flag)
Flags the message with specified flag.
Public methodGetAll
Gets UIDS of all messages in the current folder (mailbox). Equivalent to Search(Expression.All())
Public methodGetBodyStructure(List<(Of <<'(Int64>)>>))
Gets the structure of the specified message. Does not set the Seen flag.
Public methodGetBodyStructure(Int64)
Gets the structure of the specified message. Does not set the Seen flag.
Public methodGetBodyStructureByUID(List<(Of <<'(Int64>)>>))
Gets the structure of the specified message. Does not set the Seen flag.
Public methodGetBodyStructureByUID(Int64)
Gets the structure of the specified message.
Public methodGetEnvelope(List<(Of <<'(Int64>)>>))
Gets the envelope (Subject, From, To...) of the specified messages. Does not set the Seen flag.
Public methodGetEnvelope(Int64)
Gets the envelope (Subject, From, To...) of the specified message. Does not set the Seen flag.
Public methodGetEnvelopeByUID(List<(Of <<'(Int64>)>>))
Gets the envelope (Subject, From, To...) of the specified messages. Does not set the Seen flag.
Public methodGetEnvelopeByUID(Int64)
Gets the envelope (Subject, From, To...) of the specified message. Does not set the Seen flag.
Public methodGetFlags(List<(Of <<'(Int64>)>>))
Gets flags for the specified email messages from server. Does not set the Seen.
Public methodGetFlags(Int64)
Gets flags for the specified email message from server. Does not set the Seen.
Public methodGetFlagsByUID(List<(Of <<'(Int64>)>>))
Gets flags for the specified email messages from server. Does not set the Seen.
Public methodGetFlagsByUID(Int64)
Gets flags for the specified email message from server. Does not set the Seen.
Public methodGetFolders()()()()
Lists all folders (mailboxes) starting from root. Folders starting with '#' are usually shared between users. You can use GetNamespaces()()()() to obtain information about shared folders.
Public methodGetFolders(String)
Lists all folders (mailboxes) under specified folder (mailbox).
Public methodGetFolders(FolderInfo)
Lists all folders (mailboxes) under specified folder (mailbox).
Public methodGetFoldersOneLevelDown()()()()
Lists folders (mailboxes) starting from root. Only direct children are returned.
Public methodGetFoldersOneLevelDown(String)
Lists all folders (mailboxes) under specified folder (mailbox). Only direct children are returned.
Public methodGetFoldersOneLevelDown(FolderInfo)
Lists all folders (mailboxes) under specified folder (mailbox). Only direct children are returned.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetHeaders(List<(Of <<'(Int64>)>>))
Gets all headers of the specified email messages from server. Use MailBuilder to create IMail object.
Public methodGetHeaders(Int64)
Gets all headers of the specified mail message from server. Use MailBuilder to create IMail object.
Public methodGetHeadersByUID(List<(Of <<'(Int64>)>>))
Gets all headers of the specified email messages from server. Use MailBuilder to create IMail object.
Public methodGetHeadersByUID(Int64)
Gets all headers of the specified mail message from server. Use MailBuilder to create IMail object.
Public methodGetMessage
Gets specified mail message from server. Use MailBuilder to create IMail object. This method sets the Seen unless folder is selected with Examine(String), Examine(FolderInfo) or ExamineInbox()()()().
Public methodGetMessageByUID
Gets specified mail message from server. Use MailBuilder to create IMail object. This method sets the Seen unless folder is selected with Examine(String), Examine(FolderInfo) or ExamineInbox()()()().
Public methodGetMessageInfo(List<(Of <<'(Int64>)>>))
Gets message information for the specified messages. Does not set the Seen flag.
Public methodGetMessageInfo(Int64)
Gets message information for the specified message. Does not set the Seen flag.
Public methodGetMessageInfoByUID(List<(Of <<'(Int64>)>>))
Gets message information for the specified messages. Does not set the Seen flag.
Public methodGetMessageInfoByUID(Int64)
Gets message information for the specified message. Does not set the Seen flag.
Public methodGetMimePart
Gets the data for specified part.
Public methodGetMimePartByUID
Gets the data for specified part.
Public methodGetMimePartText
Gets the text data for specified part.
Public methodGetMimePartTextByUID
Gets the text data for specified part.
Public methodGetNamespaces
Lists all namespaces available for this user. Not all servers support Namespace. You can check which extensions remote server supports using SupportedExtensions()()()() method.
Public methodGetQuota
Gets quota with specified name. Not all servers support Quota, you can check which extensions remote server supports using SupportedExtensions()()()() method.
Public methodGetQuotaRoot
Gets quotas for specified folder. Not all servers support Quota, you can check which extensions remote server supports using SupportedExtensions()()()() method.
Protected methodGetServerGreeting
Override this function to get server's greeting.
(Overrides TcpTextClient..::..GetServerGreeting()()()().)
Public methodGetSpecificHeaders(List<(Of <<'(Int64>)>>), array<String>[]()[][])
Gets specific headers of the specified email messages from server.
Public methodGetSpecificHeaders(Int64, array<String>[]()[][])
Gets specific headers of the specified email message from server.
Public methodGetSpecificHeadersByUID(List<(Of <<'(Int64>)>>), array<String>[]()[][])
Gets specific headers of the specified email messages from server.
Public methodGetSpecificHeadersByUID(Int64, array<String>[]()[][])
Gets specific headers of the specified email message from server.
Public methodGetSubscribedFolders()()()()
Lists all folders (mailboxes) user is subscribed to.
Public methodGetSubscribedFolders(String)
Lists all folders (mailboxes) user is subscribed to starting from specified folder.
Public methodGetSubscribedFolders(FolderInfo)
Lists all folders (mailboxes) user is subscribed to starting from specified folder.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGmailGetLabels(List<(Of <<'(Int64>)>>))
Gets Gmail labels for the specified email messages from server. Does not set the Seen.
Public methodGmailGetLabels(Int64)
Gets Gmail labels for the specified email message from server. Does not set the Seen.
Public methodGmailGetLabelsByUID(List<(Of <<'(Int64>)>>))
Gets Gmail labels for the specified email messages from server. Does not set the Seen.
Public methodGmailGetLabelsByUID(Int64)
Gets Gmail labels for the specified email message from server. Does not set the Seen. You can label message using method.
Public methodGmailLabelMessage(List<(Of <<'(Int64>)>>), List<(Of <<'(String>)>>))
Labels the messages with specified labels.
Public methodGmailLabelMessage(List<(Of <<'(Int64>)>>), String)
Labels the messages with specified label.
Public methodGmailLabelMessage(Int64, List<(Of <<'(String>)>>))
Labels the messages with specified labels.
Public methodGmailLabelMessage(Int64, String)
Labels the message with specified label.
Public methodGmailLabelMessageByUID(List<(Of <<'(Int64>)>>), List<(Of <<'(String>)>>))
Labels the messages with specified labels.
Public methodGmailLabelMessageByUID(List<(Of <<'(Int64>)>>), String)
Labels the messages with specified label.
Public methodGmailLabelMessageByUID(Int64, List<(Of <<'(String>)>>))
Labels the messages with specified labels.
Public methodGmailLabelMessageByUID(Int64, String)
Labels the message with specified label.
Public methodGmailUnlabelMessage(List<(Of <<'(Int64>)>>), String)
Removes specified label from messages.
Public methodGmailUnlabelMessage(Int64, String)
Removes specified label from the message.
Public methodGmailUnlabelMessageByUID(List<(Of <<'(Int64>)>>), String)
Removes specified label from messages.
Public methodGmailUnlabelMessageByUID(Int64, String)
Removes specified label from the message.
Public methodIdle()()()()
Sends IDLE command. This method hangs until server announces new event in current folder or until StopIdle()()()() command is issued. Not all servers support Idle. You can check which extensions remote server supports using SupportedExtensions()()()() method.
Public methodIdle(TimeSpan)
Sends IDLE command. This method hangs until server announces new event in current folder or until StopIdle()()()() command is issued. Not all servers support Idle. You can check which extensions remote server supports using SupportedExtensions()()()() method.
Public methodLogin
Logs user in using LOGIN command. When LOGIN command is disabled by including the LOGINDISABLED capability this method tries to log-in using UseBestLogin(String, String). Unless SSL connection is used this method sends the password in clear text. You can check which methods remote server supports using SupportedAuthenticationMethods()()()() method.
Public methodLoginCRAM
Logs user in using AUTHENTICATE CRAM-MD5 command. This method does NOT send the password in clear text. You can check which methods remote server supports using SupportedAuthenticationMethods()()()() method.
Public methodLoginDIGEST
Logs user in using AUTHENTICATE DIGEST-MD5 command. This method does NOT send the password in clear text. You can check which methods remote server supports using SupportedAuthenticationMethods()()()() method.
Public methodLoginOAUTH
Logs user in using AUTHENTICATE XOAUTH command. This method does NOT send the password. You can use OAuth class to create the key. You can check which methods remote server supports using SupportedAuthenticationMethods()()()() method.
Public methodLoginPLAIN(String, String)
Logs user in using AUTHENTICATE PLAIN command. This method sends the password in clear text (BASE64), unless SSL connection is used.
Public methodLoginPLAIN(String, String, String)
Logs user in using AUTHENTICATE PLAIN command. This method sends the password in clear text (BASE64), unless SSL connection is used.
Public methodMarkMessageSeen(List<(Of <<'(Int64>)>>))
Flags message with Seen flag.
Public methodMarkMessageSeen(Int64)
Flags message with Seen flag.
Public methodMarkMessageSeenByUID(List<(Of <<'(Int64>)>>))
Flags message with Seen flag.
Public methodMarkMessageSeenByUID(Int64)
Flags message with Seen flag.
Public methodMarkMessageUnseen(List<(Of <<'(Int64>)>>))
Removes Seen flag from the message.
Public methodMarkMessageUnseen(Int64)
Removes Seen flag from the message.
Public methodMarkMessageUnseenByUID(List<(Of <<'(Int64>)>>))
Removes Seen flag from the message.
Public methodMarkMessageUnseenByUID(Int64)
Removes Seen flag from the message.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMove(List<(Of <<'(Int64>)>>), FolderInfo)
Moves the specified messages to the specified destination folder (mailbox).
Public methodMove(List<(Of <<'(Int64>)>>), String)
Moves the specified messages to the specified destination folder (mailbox).
Public methodMove(Int64, FolderInfo)
Moves the specified message to the specified destination folder (mailbox).
Public methodMove(Int64, String)
Moves the specified message to the specified destination folder (mailbox).
Public methodMoveByUID(List<(Of <<'(Int64>)>>), FolderInfo)
Moves the specified messages to the specified destination folder (mailbox).
Public methodMoveByUID(List<(Of <<'(Int64>)>>), String)
Moves the specified messages to the specified destination folder (mailbox).
Public methodMoveByUID(Int64, FolderInfo)
Moves the specified message to the specified destination folder (mailbox).
Public methodMoveByUID(Int64, String)
Moves the specified message to the specified destination folder (mailbox).
Public methodNoop
Always succeeds. It does nothing. Can be used as a periodic poll for new messages - updates FolderStatus returned by last Select(String), Select(FolderInfo) command. Can also be used to reset any inactivity auto-logout timer on the server.
Public methodNumberSearch
Gets numbers of all messages that match specified criteria. Use And(array<ICriterion>[]()[][]), Or(ICriterion, ICriterion) and other Expression methods to create a valid query. You can also pass SimpleImapQuery to this method.
Public methodNumberSearchFlag
Gets numbers of all messages in the current folder (mailbox) with specified flag. Equivalent to Search().Where(Expression.HasFlag(flag)).ResultsAs(ResultType.Numbers)
Public methodPeekHeaders
Gets headers of the specified mail message from server. Use MailBuilder to create IMail object. Does not set the Seen.
Public methodPeekHeadersByUID
Gets headers of the specified mail message from server. Use MailBuilder to create IMail object. Does not set the Seen.
Public methodPeekMessage
Gets specified mail message from server. This method in contrast to GetMessage(Int64) does not set the Seen. Use MailBuilder to create IMail object.
Public methodPeekMessageByUID
Gets specified mail message from server. This method in contrast to GetMessage(Int64) does not set the Seen. Use MailBuilder to create IMail object.
Public methodPeekMimePart
Peeks the data for specified part. Does not set the Seen flag.
Public methodPeekMimePartByUID
Peeks the data for specified part. Does not set the Seen flag.
Public methodPeekMimePartText
Peeks the text data for specified part. Does not set the Seen flag.
Public methodPeekMimePartTextByUID
Peeks the text data for specified part. Does not set the Seen flag.
Public methodPeekSpecificHeaders(List<(Of <<'(Int64>)>>), array<String>[]()[][])
Gets specific headers of the specified email messages from server. Does not set the Seen.
Public methodPeekSpecificHeaders(Int64, array<String>[]()[][])
Gets specific headers of the specified email message from server. Does not set the Seen.
Public methodPeekSpecificHeadersByUID(List<(Of <<'(Int64>)>>), array<String>[]()[][])
Gets specific headers of the specified email messages from server. Does not set the Seen.
Public methodPeekSpecificHeadersByUID(Int64, array<String>[]()[][])
Gets specific headers of the specified email message from server. Does not set the Seen.
Public methodReceiveResponse
Receives the response ending with specified request tag.
Public methodRenameFolder
Changes the name of a folder (mailbox).
Public methodSearch()()()()
Creates new search query.
Public methodSearch(ICriterion)
Gets UIDS of all messages that match specified search criteria using server-side searching. Use And(array<ICriterion>[]()[][]), Or(ICriterion, ICriterion) and other Expression methods to create a valid query. You can also pass SimpleImapQuery to this method.
Public methodSearchFlag
Gets UIDS of all messages in the current folder (mailbox) with specified flag. Equivalent to Search(Expression.HasFlag(flag))
Public methodSelect(String)
Selects specified folder (mailbox) as the current folder so that messages inside can be accessed. Select command will remove the Recent flag since the folder has now been viewed (This is not the same as the Seen IMAP flag).
Public methodSelect(FolderInfo)
Selects specified folder (mailbox) as the current folder so that messages inside can be accessed. Select command will remove the Recent flag since the folder has now been viewed (This is not the same as the Seen IMAP flag).
Public methodSelectInbox
Selects 'INBOX' as a current folder (mailbox) so that messages inside can be accessed. Select command will remove the Recent flag since the folder has now been viewed (This is not the same as the Seen IMAP flag).
Public methodSend
Sends the text command to server. Adds "\r\n" to the command.
(Inherited from TcpTextClient.)
Public methodSendCommand(String)
Sends command and waits for the server response.
Public methodSendCommand(String, Boolean)
Sends command and waits for the server response.
Public methodSendYahooIDCommand
Sends Yahoo's specific ID command ('ID ("GUID" "1")'). This command is required to access yahoo. This command is sent automatically on connection when the host address contains "yahoo" string.
Public methodStartTLS
Sends 'STARTTLS' command and initializes SSL connection. Not all servers support StartTLS. You can check which extensions remote server supports using SupportedExtensions()()()() method.
Public methodStatus(String)
The STATUS command requests the status of the indicated mailbox. It does not change the currently selected mailbox, nor does it affect the state of any messages in the queried mailbox (messages don't lose the Recent) flag. This command MUST NOT be used as a "check for new messages in the selected mailbox" operation (You should rather use FolderStatus and Noop()()()() or UIDNext) or SearchFlag(Flag)). STATUS command is not guaranteed to be fast in its response.
Public methodStatus(FolderInfo)
The STATUS command requests the status of the indicated mailbox. It does not change the currently selected mailbox, nor does it affect the state of any messages in the queried mailbox (messages don't lose the Recent) flag. This command MUST NOT be used as a "check for new messages in the selected mailbox" operation (You should rather use FolderStatus and Noop()()()() or UIDNext) or SearchFlag(Flag)). STATUS command is not guaranteed to be fast in its response.
Public methodStopIdle
Stops IDLE command started by Idle()()()() or Idle(TimeSpan) method. This method is thread-safe.
Public methodSubscribeFolder(String)
Subscribes user to specified folder.
Public methodSubscribeFolder(FolderInfo)
Subscribes user to specified folder.
Public methodSupportedAuthenticationMethods
Lists authentication methods supported by the remote server.
Public methodSupportedExtensions
Lists extensions supported by the remote server (e.g. SORT, XLIST, UIDPLUS)
Public methodSupportedThreadMethods
Lists threading methods supported by the remote server.
Protected methodSwitchToSSL
Switches to SSL stream, authenticates as client.
(Inherited from TcpTextClient.)
Public methodThread(ThreadMethod)
Creates new threading query.
Public methodThread(ThreadMethod, ICriterion)
Gets threaded messages, that match specified search criteria, using server-side threading.
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Public methodUnflagMessage(List<(Of <<'(Int64>)>>), Flag)
Removes specified flag from messages.
Public methodUnflagMessage(Int64, Flag)
Removes specified flag from the message.
Public methodUnflagMessageByUID(List<(Of <<'(Int64>)>>), Flag)
Removes specified flag from messages.
Public methodUnflagMessageByUID(Int64, Flag)
Removes specified flag from the message.
Public methodUnsubscribeFolder(String)
Unsubscribes user from specified folder.
Public methodUnsubscribeFolder(FolderInfo)
Unsubscribes user from specified folder.
Public methodUploadMessage(String, IMail)
Uploads message to specified folder (mailbox). Uploaded message has Seen set. Internal date of the resulting message is set to the current date and time.
Public methodUploadMessage(String, String)
Uploads message to specified folder (mailbox). Uploaded message has Seen set. Internal date of the resulting message is set to the current date and time.
Public methodUploadMessage(FolderInfo, IMail)
Uploads message to specified folder (mailbox). Uploaded message has Seen set. Internal date of the resulting message is set to the current date and time.
Public methodUploadMessage(FolderInfo, String)
Uploads message to specified folder (mailbox). Uploaded message has Seen set. Internal date of the resulting message is set to the current date and time.
Public methodUploadMessage(String, IMail, UploadMessageInfo)
Uploads message to specified folder (mailbox).
Public methodUploadMessage(String, String, UploadMessageInfo)
Uploads message to specified folder (mailbox).
Public methodUploadMessage(FolderInfo, IMail, UploadMessageInfo)
Uploads message to specified folder (mailbox).
Public methodUploadMessage(FolderInfo, String, UploadMessageInfo)
Uploads message to specified folder (mailbox).
Public methodUseBestLogin
Logs user in using best available method. When no AUTH capability is found, this method switches to SSL (StartTLS()()()()) and tries again.

See Also