C# Класс LumiSoft.Net.IMAP.Client.IMAP_Client

IMAP client.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
DecodeUtf7 ( string str ) : string
EncodeUtf7 ( string str ) : string
IsStatusResponse ( string line ) : bool

Описание методов

Authenticate() публичный Метод

Authenticates user.
public Authenticate ( string userName, string password ) : void
userName string User name.
password string Password.
Результат void

Connect() публичный Метод

Connects to IMAP server.
public Connect ( string host, int port ) : void
host string Host name.
port int Port number.
Результат void

CopyMessages() публичный Метод

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.
Результат void

CreateFolder() публичный Метод

Creates specified folder.
public CreateFolder ( string folderName ) : void
folderName string Folder name. Eg. test, Inbox/SomeSubFolder. NOTE: use GetFolderSeparator() to get right folder separator.
Результат void

DeleteFolder() публичный Метод

Deletes specified folder.
public DeleteFolder ( string folderName ) : void
folderName string Folder name.
Результат void

DeleteFolderACL() публичный Метод

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.
Результат void

DeleteMessages() публичный Метод

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.
Результат void

Disconnect() публичный Метод

Disconnects from IMAP server.
public Disconnect ( ) : void
Результат void

Dispose() публичный Метод

Clean up any resources being used.
public Dispose ( ) : void
Результат void

FetchMessages() публичный Метод

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.
Результат LumiSoft.Net.IMAP.Client.IMAP_FetchItem[]

GetFolderACL() публичный Метод

TODO:
public GetFolderACL ( string folderName ) : void
folderName string
Результат void

GetFolderMyrights() публичный Метод

Gets myrights to specified folder.
public GetFolderMyrights ( string folderName ) : IMAP_ACL_Flags
folderName string
Результат IMAP_ACL_Flags

GetFolderSeparator() публичный Метод

Gets IMAP server folder separator char.
public GetFolderSeparator ( ) : string
Результат string

GetFolders() публичный Метод

Gets all available folders.
public GetFolders ( ) : string[]
Результат string[]

GetMessagesTotalSize() публичный Метод

Gets messages total size in selected folder.
public GetMessagesTotalSize ( ) : int
Результат int

GetSubscribedFolders() публичный Метод

Gets all subscribed folders.
public GetSubscribedFolders ( ) : string[]
Результат string[]

GetUnseenMessagesCount() публичный Метод

Gets unseen messages count in selected folder.
public GetUnseenMessagesCount ( ) : int
Результат int

IMAP_Client() публичный Метод

Default constructor.
public IMAP_Client ( ) : System
Результат System

MoveMessages() публичный Метод

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.
Результат void

RenameFolder() публичный Метод

Renames specified folder.
public RenameFolder ( string sourceFolderName, string destinationFolderName ) : void
sourceFolderName string Source folder name.
destinationFolderName string Destination folder name.
Результат void

SelectFolder() публичный Метод

Selects specified folder.
public SelectFolder ( string folderName ) : void
folderName string Folder name.
Результат void

SetFolderACL() публичный Метод

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.
Результат void

StoreMessage() публичный Метод

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.
Результат void

StoreMessageFlags() публичный Метод

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.
Результат void

SubscribeFolder() публичный Метод

Subscribes specified folder.
public SubscribeFolder ( string folderName ) : void
folderName string Folder name.
Результат void

UnSubscribeFolder() публичный Метод

UnSubscribes specified folder.
public UnSubscribeFolder ( string folderName ) : void
folderName string Folder name,
Результат void