C# Class LumiSoft.Net.IMAP.Client.IMAP_Client

IMAP client.
Inheritance: IDisposable
Exibir arquivo Open project: jeske/StepsDB-alpha Class Usage Examples

Public Methods

Method Description
Authenticate ( string userName, string password ) : void

Authenticates user.

Connect ( string host, int port ) : void

Connects to IMAP server.

CopyMessages ( int startMsgNo, int endMsgNo, string destFolder, bool uidCopy ) : void

Makes copy of messages to specified folder.

CreateFolder ( string folderName ) : void

Creates specified folder.

DeleteFolder ( string folderName ) : void

Deletes specified folder.

DeleteFolderACL ( string folderName, string userName ) : void

Deletes specifieed user access to specified folder.

DeleteMessages ( int startMsgNo, int endMsgNo, bool uidDelete ) : void

Deletes specified messages.

Disconnect ( ) : void

Disconnects from IMAP server.

Dispose ( ) : void

Clean up any resources being used.

FetchMessages ( int startMsgNo, int endMsgNo, bool uidFetch, bool headersOnly, bool setSeenFlag ) : LumiSoft.Net.IMAP.Client.IMAP_FetchItem[]

Fetches messages headers or full messages data.

GetFolderACL ( string folderName ) : void

TODO:

GetFolderMyrights ( string folderName ) : IMAP_ACL_Flags

Gets myrights to specified folder.

GetFolderSeparator ( ) : string

Gets IMAP server folder separator char.

GetFolders ( ) : string[]

Gets all available folders.

GetMessagesTotalSize ( ) : int

Gets messages total size in selected folder.

GetSubscribedFolders ( ) : string[]

Gets all subscribed folders.

GetUnseenMessagesCount ( ) : int

Gets unseen messages count in selected folder.

IMAP_Client ( ) : System

Default constructor.

MoveMessages ( int startMsgNo, int endMsgNo, string destFolder, bool uidMove ) : void

Moves messages to specified folder.

RenameFolder ( string sourceFolderName, string destinationFolderName ) : void

Renames specified folder.

SelectFolder ( string folderName ) : void

Selects specified folder.

SetFolderACL ( string folderName, string userName, IMAP_ACL_Flags acl ) : void

Sets specified user ACL permissions for specified folder.

StoreMessage ( string folderName, byte data ) : void

Stores message to specified folder.

StoreMessageFlags ( int startMsgNo, int endMsgNo, bool uidStore, IMAP_MessageFlags msgFlags ) : void

Stores message folgs to sepcified messages range.

SubscribeFolder ( string folderName ) : void

Subscribes specified folder.

UnSubscribeFolder ( string folderName ) : void

UnSubscribes specified folder.

Private Methods

Method Description
DecodeUtf7 ( string str ) : string
EncodeUtf7 ( string str ) : string
IsStatusResponse ( string line ) : bool

Method Details

Authenticate() public method

Authenticates user.
public Authenticate ( string userName, string password ) : void
userName string User name.
password string Password.
return void

Connect() public method

Connects to IMAP server.
public Connect ( string host, int port ) : void
host string Host name.
port int Port number.
return void

CopyMessages() public method

Makes copy of messages to specified folder.
public CopyMessages ( int startMsgNo, int endMsgNo, string destFolder, bool uidCopy ) : void
startMsgNo int Start message number.
endMsgNo int End message number. -1 = last.
destFolder string Folder where to cpoy messages.
uidCopy bool Specifies if startMsgNo and endMsgNo is message UIDs.
return void

CreateFolder() public method

Creates specified folder.
public CreateFolder ( string folderName ) : void
folderName string Folder name. Eg. test, Inbox/SomeSubFolder. NOTE: use GetFolderSeparator() to get right folder separator.
return void

DeleteFolder() public method

Deletes specified folder.
public DeleteFolder ( string folderName ) : void
folderName string Folder name.
return void

DeleteFolderACL() public method

Deletes specifieed user access to specified folder.
public DeleteFolderACL ( string folderName, string userName ) : void
folderName string Folder which ACL to remove.
userName string User name who's ACL to remove.
return void

DeleteMessages() public method

Deletes specified messages.
public DeleteMessages ( int startMsgNo, int endMsgNo, bool uidDelete ) : void
startMsgNo int Start message number.
endMsgNo int End message number. -1 = last.
uidDelete bool Specifies if startMsgNo and endMsgNo is message UIDs.
return void

Disconnect() public method

Disconnects from IMAP server.
public Disconnect ( ) : void
return void

Dispose() public method

Clean up any resources being used.
public Dispose ( ) : void
return void

FetchMessages() public method

Fetches messages headers or full messages data.
public FetchMessages ( int startMsgNo, int endMsgNo, bool uidFetch, bool headersOnly, bool setSeenFlag ) : LumiSoft.Net.IMAP.Client.IMAP_FetchItem[]
startMsgNo int Start message number.
endMsgNo int End message number. -1 = last.
uidFetch bool Specifies if startMsgNo and endMsgNo is message UIDs.
headersOnly bool If true message headers are retrieved, otherwise full message retrieved.
setSeenFlag bool If true message seen flag is setted.
return LumiSoft.Net.IMAP.Client.IMAP_FetchItem[]

GetFolderACL() public method

TODO:
public GetFolderACL ( string folderName ) : void
folderName string
return void

GetFolderMyrights() public method

Gets myrights to specified folder.
public GetFolderMyrights ( string folderName ) : IMAP_ACL_Flags
folderName string
return IMAP_ACL_Flags

GetFolderSeparator() public method

Gets IMAP server folder separator char.
public GetFolderSeparator ( ) : string
return string

GetFolders() public method

Gets all available folders.
public GetFolders ( ) : string[]
return string[]

GetMessagesTotalSize() public method

Gets messages total size in selected folder.
public GetMessagesTotalSize ( ) : int
return int

GetSubscribedFolders() public method

Gets all subscribed folders.
public GetSubscribedFolders ( ) : string[]
return string[]

GetUnseenMessagesCount() public method

Gets unseen messages count in selected folder.
public GetUnseenMessagesCount ( ) : int
return int

IMAP_Client() public method

Default constructor.
public IMAP_Client ( ) : System
return System

MoveMessages() public method

Moves messages to specified folder.
public MoveMessages ( int startMsgNo, int endMsgNo, string destFolder, bool uidMove ) : void
startMsgNo int Start message number.
endMsgNo int End message number. -1 = last.
destFolder string Folder where to cpoy messages.
uidMove bool Specifies if startMsgNo and endMsgNo is message UIDs.
return void

RenameFolder() public method

Renames specified folder.
public RenameFolder ( string sourceFolderName, string destinationFolderName ) : void
sourceFolderName string Source folder name.
destinationFolderName string Destination folder name.
return void

SelectFolder() public method

Selects specified folder.
public SelectFolder ( string folderName ) : void
folderName string Folder name.
return void

SetFolderACL() public method

Sets specified user ACL permissions for specified folder.
public SetFolderACL ( string folderName, string userName, IMAP_ACL_Flags acl ) : void
folderName string Folder name which ACL to set.
userName string User name who's ACL to set.
acl IMAP_ACL_Flags ACL permissions to set.
return void

StoreMessage() public method

Stores message to specified folder.
public StoreMessage ( string folderName, byte data ) : void
folderName string Folder where to store message.
data byte Message data which to store.
return void

StoreMessageFlags() public method

Stores message folgs to sepcified messages range.
public StoreMessageFlags ( int startMsgNo, int endMsgNo, bool uidStore, IMAP_MessageFlags msgFlags ) : void
startMsgNo int Start message number.
endMsgNo int End message number.
uidStore bool Sepcifies if message numbers are message UID numbers.
msgFlags IMAP_MessageFlags Message flags to store.
return void

SubscribeFolder() public method

Subscribes specified folder.
public SubscribeFolder ( string folderName ) : void
folderName string Folder name.
return void

UnSubscribeFolder() public method

UnSubscribes specified folder.
public UnSubscribeFolder ( string folderName ) : void
folderName string Folder name,
return void