LumiSoft Net Help
IMAP_Client Class
NamespacesLumiSoft.Net.IMAP.ClientIMAP_Client
IMAP v4 Client. Defined in RFC 3501.
Declaration Syntax
C#Visual BasicVisual C++F#
public class IMAP_Client : TCP_Client
Public Class IMAP_Client
	Inherits TCP_Client
public ref class IMAP_Client : public TCP_Client
type IMAP_Client =  
    class
        inherit TCP_Client
    end
Members
All MembersConstructorsMethodsPropertiesEvents



IconMemberDescription
IMAP_Client()()()()
Default constructor.

Authenticate(AUTH_SASL_Client)
Sends AUTHENTICATE command to IMAP server.

AuthenticateAsync(IMAP_Client..::..AuthenticateAsyncOP)
Starts sending AUTHENTICATE command to IMAP server.

AuthenticatedUserIdentity
Gets session authenticated user identity, returns null if not authenticated.
(Overrides TCP_Session.AuthenticatedUserIdentity.)
BeginConnect(String, Int32, AsyncCallback, Object) Obsolete.
Starts connection to the specified host.
(Inherited from TCP_Client.)
BeginConnect(String, Int32, Boolean, AsyncCallback, Object) Obsolete.
Starts connection to the specified host.
(Inherited from TCP_Client.)
BeginConnect(IPEndPoint, Boolean, AsyncCallback, Object) Obsolete.
Starts connection to the specified remote end point.
(Inherited from TCP_Client.)
BeginConnect(IPEndPoint, IPEndPoint, Boolean, AsyncCallback, Object) Obsolete.
Starts connection to the specified remote end point.
(Inherited from TCP_Client.)
BeginDisconnect(AsyncCallback, Object)
Starts disconnecting connection.
(Inherited from TCP_Client.)
Capabilities
Get IMAP server(CAPABILITY command cached) supported capabilities.

Capability()()()()
Gets IMAP server capabilities.

CapabilityAsync(IMAP_Client..::..CapabilityAsyncOP)
Executes CAPABILITY command.

CloseFolder()()()()
Closes selected folder, all messages marked as Deleted will be expunged.

CloseFolderAsync(IMAP_Client..::..CloseFolderAsyncOP)
Executes CLOSE command.

Connect(String, Int32)
Connects to the specified host. If the hostname resolves to more than one IP address, all IP addresses will be tried for connection, until one of them connects.
(Inherited from TCP_Client.)
Connect(String, Int32, Boolean)
Connects to the specified host. If the hostname resolves to more than one IP address, all IP addresses will be tried for connection, until one of them connects.
(Inherited from TCP_Client.)
Connect(IPEndPoint, Boolean)
Connects to the specified remote end point.
(Inherited from TCP_Client.)
Connect(IPEndPoint, IPEndPoint, Boolean)
Connects to the specified remote end point.
(Inherited from TCP_Client.)
Connect(IPEndPoint, IPEndPoint, Boolean, RemoteCertificateValidationCallback)
Connects to the specified remote end point.
(Inherited from TCP_Client.)
ConnectAsync(TCP_Client..::..ConnectAsyncOP)
Starts connecting to remote end point.
(Inherited from TCP_Client.)
ConnectTime
Gets the time when session was connected.
(Inherited from TCP_Client.)
CopyMessages(Boolean, IMAP_t_SeqSet, String)
Copies specified messages from current selected folder to the specified target folder.

CopyMessages(IMAP_Client..::..CopyMessagesAsyncOP)
Copies specified messages from current selected folder to the specified target folder.

CopyMessages(Boolean, IMAP_SequenceSet, String) Obsolete.
Copies specified messages from current selected folder to the specified target folder.

CopyMessagesAsync(IMAP_Client..::..CopyMessagesAsyncOP)
Executes COPY command.

CreateFolder(String)
Creates new folder.

CreateFolderAsync(IMAP_Client..::..CreateFolderAsyncOP)
Executes CREATE command.

DeleteFolder(String)
Deletes specified folder.

DeleteFolderAcl(String, String)
Deletes the specified folder user ACL entry.

DeleteFolderAclAsync(IMAP_Client..::..DeleteFolderAclAsyncOP)
Executes DELETEACL command.

DeleteFolderAsync(IMAP_Client..::..DeleteFolderAsyncOP)
Executes DELETE command.

Disconnect()()()()
Closes connection to IMAP server.
(Overrides TCP_Client.Disconnect()()()().)
Dispose()()()()
Cleans up any resources being used. This method is thread-safe.
(Inherited from TCP_Client.)
Enable(array<String>[]()[][])
Enables the specified IMAP capabilities in server.

EnableAsync(IMAP_Client..::..EnableAsyncOP)
Executes ENABLE command.

EnableUtf8()()()()
Enables UTF-8 support in IMAP server.

EndConnect(IAsyncResult) Obsolete.
Ends a pending asynchronous connection request.
(Inherited from TCP_Client.)
EndDisconnect(IAsyncResult)
Ends a pending asynchronous disconnect request.
(Inherited from TCP_Client.)
Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
ExamineFolder(String)
Selects folder as read-only, no changes to messages or flags not possible.

ExamineFolderAsync(IMAP_Client..::..ExamineFolderAsyncOP)
Executes EXAMINE command.

Expunge()()()()
Deletes all messages in selected folder which has "Deleted" flag set.

ExpungeAsync(IMAP_Client..::..ExpungeAsyncOP)
Executes EXPUNGE command.

Fetch(Boolean, IMAP_t_SeqSet, array<IMAP_t_Fetch_i>[]()[][], EventHandler<(Of <<'(EventArgs<(Of <<'(IMAP_r_u>)>>)>)>>))
Fetches specified message items.

Fetch(Boolean, IMAP_SequenceSet, array<IMAP_Fetch_DataItem>[]()[][], IMAP_Client_FetchHandler) Obsolete.
Fetches specified message items.

FetchAsync(IMAP_Client..::..FetchAsyncOP)
Starts executing FETCH command.

FetchGetStoreStream
This event is raised when FETCH response parsing allows to specify stream where to store binary data.

Finalize()()()()
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
FolderSeparator
Gets IMAP server folder separator.

FolderStatus(String)
Gets the specified folder status.

FolderStatusAsync(IMAP_Client..::..FolderStatusAsyncOP)
Executes STATUS command.

GetFolderAcl(String)
Gets the specified folder ACL entries.

GetFolderAclAsync(IMAP_Client..::..GetFolderAclAsyncOP)
Executes GETACL command.

GetFolderMyRights(String)
Gets myrights to the specified folder.

GetFolderMyRightsAsync(IMAP_Client..::..GetFolderMyRightsAsyncOP)
Executes MYRIGHTS command.

GetFolderQuota(String) Obsolete.
Gets the specified folder quota-root resource limit entries.

GetFolderQuotaRoots(String)
Gets specified folder quota roots and their quota resource usage.

GetFolderQuotaRootsAsync(IMAP_Client..::..GetFolderQuotaRootsAsyncOP)
Executes STATUS command.

GetFolderRights(String, String)
Gets rights which can be set for the specified identifier.

GetFolderRightsAsync(IMAP_Client..::..GetFolderRightsAsyncOP)
Executes LISTRIGHTS command.

GetFolders(String)
Gets folders list.

GetFoldersAsync(IMAP_Client..::..GetFoldersAsyncOP)
Executes LIST command.

GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetNamespaces()()()()
Gets IMAP server namespaces.

GetNamespacesAsync(IMAP_Client..::..GetNamespacesAsyncOP)
Executes NAMESPACE command.

GetQuota(String)
Gets the specified folder quota-root resource limit entries.

GetQuotaAsync(IMAP_Client..::..GetQuotaAsyncOP)
Executes GETQUOTA command.

GetSubscribedFolders(String)
Get user subscribed folders list.

GetSubscribedFoldersAsync(IMAP_Client..::..GetSubscribedFoldersAsyncOP)
Executes LSUB command.

GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
GreetingText
Get IMAP server greeting text.

ID
Gets session ID.
(Inherited from TCP_Client.)
IdleAsync(IMAP_Client..::..IdleAsyncOP)
Executes IDLE command.

IdleOP
Gets active IDLE operation or null if no active IDLE operation.

IsAuthenticated
Gets if this session is authenticated.
(Inherited from TCP_Session.)
IsConnected
Gets if TCP client is connected.
(Inherited from TCP_Client.)
IsDisposed
Gets if this object is disposed.
(Inherited from TCP_Client.)
IsSecureConnection
Gets if this session TCP connection is secure connection.
(Inherited from TCP_Client.)
LastActivity
Gets the last time when data was sent or received.
(Inherited from TCP_Client.)
LocalEndPoint
Gets session local IP end point.
(Inherited from TCP_Client.)
LogAddException(String, Exception)
Logs exception.
(Inherited from TCP_Client.)
LogAddRead(Int64, String)
Logs read operation.
(Inherited from TCP_Client.)
LogAddText(String)
Logs free text entry.
(Inherited from TCP_Client.)
LogAddWrite(Int64, String)
Logs write operation.
(Inherited from TCP_Client.)
Logger
Gets or sets TCP client logger. Value null means no logging.
(Inherited from TCP_Client.)
Login(String, String)
Authenticates user using IMAP-LOGIN method.

LoginAsync(IMAP_Client..::..LoginAsyncOP)
Executes LOGIN command.

MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
MessageExpunged
This event is raised when IMAP server expunges message and sends EXPUNGE response.

MoveMessages(Boolean, IMAP_t_SeqSet, String, Boolean)
Moves specified messages from current selected folder to the specified target folder.

MoveMessages(Boolean, IMAP_SequenceSet, String, Boolean) Obsolete.
Moves specified messages from current selected folder to the specified target folder.

Noop()()()()
Sends NOOP command to IMAP server.

NoopAsync(IMAP_Client..::..NoopAsyncOP)
Executes NOOP command.

OnConnected(TCP_Client..::..CompleteConnectCallback)
This method is called when TCP client has sucessfully connected.
(Overrides TCP_Client.OnConnected(TCP_Client..::..CompleteConnectCallback).)
OnConnected()()()()
This method is called after TCP client has sucessfully connected.
(Inherited from TCP_Client.)
OnError(Exception) Obsolete.
This must be called when unexpected error happens. When inheriting TCP_Client class, be sure that you call OnError method for each unexpected error.
(Inherited from TCP_Client.)
ReadLine()()()()
Reads and logs specified line from connected host.
(Inherited from TCP_Client.)
RemoteEndPoint
Gets session remote IP end point.
(Inherited from TCP_Client.)
RenameFolder(String, String)
Renames exisiting folder name.

RenameFolderAsync(IMAP_Client..::..RenameFolderAsyncOP)
Executes RENAME command.

Search(Boolean, Encoding, IMAP_Search_Key)
Searches message what matches specified search criteria.

Search(Boolean, String, String) Obsolete.
Searches message what matches specified search criteria.

SearchAsync(IMAP_Client..::..SearchAsyncOP)
Starts executing SEARCH command.

SelectedFolder
Gets selected folder. Returns null if no folder selected.

SelectFolder(String)
Selects specified folder.

SelectFolderAsync(IMAP_Client..::..SelectFolderAsyncOP)
Executes SELECT command.

SetFolderAcl(String, String, IMAP_Flags_SetType, IMAP_ACL_Flags)
Sets the specified folder ACL.

SetFolderAclAsync(IMAP_Client..::..SetFolderAclAsyncOP)
Executes SETACL command.

StartTls()()()()
Switches connection to secure connection.

StartTlsAsync(IMAP_Client..::..StartTlsAsyncOP)
Executes STARTTLS command.

StoreMessage(String, array<String>[]()[][], DateTime, Stream, Int32)
Stores specified message to the specified folder.

StoreMessage(String, IMAP_t_MsgFlags, DateTime, Stream, Int32)
Stores specified message to the specified folder.

StoreMessage(IMAP_Client..::..StoreMessageAsyncOP)
Stores specified message to the specified folder.

StoreMessage(String, IMAP_MessageFlags, DateTime, Stream, Int32) Obsolete.
Stores specified message to the specified folder.

StoreMessageAsync(IMAP_Client..::..StoreMessageAsyncOP)
Executes APPEND command.

StoreMessageFlags(Boolean, IMAP_t_SeqSet, IMAP_Flags_SetType, IMAP_t_MsgFlags)
Stores specified message flags to the sepcified messages.

StoreMessageFlags(Boolean, IMAP_SequenceSet, IMAP_Flags_SetType, array<String>[]()[][]) Obsolete.
Stores specified message flags to the sepcified messages.

StoreMessageFlags(Boolean, IMAP_SequenceSet, IMAP_Flags_SetType, IMAP_MessageFlags) Obsolete.
Stores specified message flags to the sepcified messages.

StoreMessageFlagsAsync(IMAP_Client..::..StoreMessageFlagsAsyncOP)
Executes STORE command.

SubscribeFolder(String)
Subscribes specified folder.

SubscribeFolderAsync(IMAP_Client..::..SubscribeFolderAsyncOP)
Executes SUBSCRIBE command.

SwitchToSecure()()()()
Switches session to secure connection.
(Inherited from TCP_Client.)
SwitchToSecureAsync(TCP_Client..::..SwitchToSecureAsyncOP)
Starts switching connection to secure.
(Inherited from TCP_Client.)
TcpStream
Gets TCP stream which must be used to send/receive data through this session.
(Inherited from TCP_Client.)
Timeout
Gets or sets default TCP read/write timeout.
(Inherited from TCP_Client.)
ToString()()()()
Returns a string that represents the current object.
(Inherited from Object.)
UnsubscribeFolder(String)
Unsubscribes specified folder.

UnsubscribeFolderAsync(IMAP_Client..::..UnsubscribeFolderAsyncOP)
Executes UNSUBSCRIBE command.

UntaggedResponse
Is raised when IMAP server sends any untagged response.

UntaggedStatusResponse
This event is raised when IMAP server sends untagged status response.

ValidateCertificateCallback
Gets or stes remote callback which is called when remote server certificate needs to be validated. Value null means not sepcified.
(Inherited from TCP_Client.)
WriteLine(String)
Sends and logs specified line to connected host.
(Inherited from TCP_Client.)
Examples
 Copy imageCopy
/*
 To make this code to work, you need to import following namespaces:
 using LumiSoft.Net.IMAP.Client; */


using(IMAP_Client imap = new IMAP_Client()){
    imap.Connect("host",143);
    // Call Capability even if you don't care about capabilities, it also controls IMAP client features.
    imap.Capability();

    imap.Authenticate(... choose auth method ...);

    // Do do your stuff ...
}
Inheritance Hierarchy

Assembly: LumiSoft.Net (Module: LumiSoft.Net.dll) Version: 4.5.5510.19119