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

IMAP client.
Inheritance: IDisposable
Afficher le fichier Open project: jeske/StepsDB-alpha Class Usage Examples

Méthodes publiques

Méthode 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

Méthode Description
DecodeUtf7 ( string str ) : string
EncodeUtf7 ( string str ) : string
IsStatusResponse ( string line ) : bool

Method Details

Authenticate() public méthode

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

Connect() public méthode

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

CopyMessages() public méthode

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.
Résultat void

CreateFolder() public méthode

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

DeleteFolder() public méthode

Deletes specified folder.
public DeleteFolder ( string folderName ) : void
folderName string Folder name.
Résultat void

DeleteFolderACL() public méthode

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.
Résultat void

DeleteMessages() public méthode

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.
Résultat void

Disconnect() public méthode

Disconnects from IMAP server.
public Disconnect ( ) : void
Résultat void

Dispose() public méthode

Clean up any resources being used.
public Dispose ( ) : void
Résultat void

FetchMessages() public méthode

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.
Résultat LumiSoft.Net.IMAP.Client.IMAP_FetchItem[]

GetFolderACL() public méthode

TODO:
public GetFolderACL ( string folderName ) : void
folderName string
Résultat void

GetFolderMyrights() public méthode

Gets myrights to specified folder.
public GetFolderMyrights ( string folderName ) : IMAP_ACL_Flags
folderName string
Résultat IMAP_ACL_Flags

GetFolderSeparator() public méthode

Gets IMAP server folder separator char.
public GetFolderSeparator ( ) : string
Résultat string

GetFolders() public méthode

Gets all available folders.
public GetFolders ( ) : string[]
Résultat string[]

GetMessagesTotalSize() public méthode

Gets messages total size in selected folder.
public GetMessagesTotalSize ( ) : int
Résultat int

GetSubscribedFolders() public méthode

Gets all subscribed folders.
public GetSubscribedFolders ( ) : string[]
Résultat string[]

GetUnseenMessagesCount() public méthode

Gets unseen messages count in selected folder.
public GetUnseenMessagesCount ( ) : int
Résultat int

IMAP_Client() public méthode

Default constructor.
public IMAP_Client ( ) : System
Résultat System

MoveMessages() public méthode

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.
Résultat void

RenameFolder() public méthode

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

SelectFolder() public méthode

Selects specified folder.
public SelectFolder ( string folderName ) : void
folderName string Folder name.
Résultat void

SetFolderACL() public méthode

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.
Résultat void

StoreMessage() public méthode

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.
Résultat void

StoreMessageFlags() public méthode

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.
Résultat void

SubscribeFolder() public méthode

Subscribes specified folder.
public SubscribeFolder ( string folderName ) : void
folderName string Folder name.
Résultat void

UnSubscribeFolder() public méthode

UnSubscribes specified folder.
public UnSubscribeFolder ( string folderName ) : void
folderName string Folder name,
Résultat void