C# 클래스 Joshi.Utils.Imap.Imap

Imap class implementes IMAP client API
상속: ImapBase
파일 보기 프로젝트 열기: rohitjoshi/ImapLibrary 1 사용 예제들

공개 메소드들

메소드 설명
CopyMessage ( string sUid, string sFolderName ) : void

Copy Message

ExamineFolder ( string sFolder ) : void

Examine the sFolder/mailbox after login

Expunge ( ) : void

Expunge

FetchMessage ( string sMessageUID, XmlTextWriter oXmlWriter, bool bFetchBody ) : void

Fetch the full message

FetchPartBody ( string sMessageUID, string sMessagePart, string &sData ) : void

Fetch the body for specified part

FetchPartHeader ( string sMessageUID, string sMessagePart, ArrayList asMessageHeader ) : void

Fetch Header of the message uid and part

GetMessageSize ( string sUid ) : long

Get the message size

GetQuota ( string sFolderName, bool &bUnlimitedQuota, int &nUsedKBytes, int &nTotalKBytes ) : void

Get the quota for specific folder

HasEnoughQuota ( string sFolderName ) : bool

Check if enough quota is available

IsMultipart ( ArrayList asHeader ) : bool

Check if this message is multipart To Identify multipart message, the content-type is either multipart or rfc822

LogOut ( ) : void

Logout the user: It logout the user and disconnect the connetion from IMAP server.

Login ( string sHost, string sUserId, string sPassword ) : void

Login to specified Imap host and default port (143)

Login ( string sHost, ushort nPort, string sUserId, string sPassword, bool sslEnabled = false ) : void

Login to specified Imap host and port

MoveMessage ( string sUid, string sFolderName ) : void

Move message to specified folder

SearchMessage ( string asSearchData, bool bExactMatch, ArrayList asSearchResult ) : void

Search the messages by specified criterias

SelectFolder ( string sFolder ) : void

Select the sFolder/mailbox after login

SetFlag ( string sUid, string flag, bool removeFlag = false ) : void

Store flag

비공개 메소드들

메소드 설명
FindAndRemove ( string &sBodyStruct, char ch ) : bool

find the given character and remove

GetBody ( string sMessageUid, string sPartNumber, string &sData ) : void

Get the message body for specified part

GetBodyStructure ( string sMessageUID, XmlTextWriter oXmlWriter, bool bFetchBody ) : void

Get the Body structure of the message. If message is single part then first part is 1 If message is multipart then first part is 0

GetContentDisposition ( string &sBodyStruct, string &sDisp ) : bool

Get Content Disposition

GetContentType ( string &sBodyStruct, string &sType, string &sSubType, string &sContentType ) : bool

Get the content type

GetHeader ( string sMessageUid, string sPartNumber, ArrayList asMessageHeader ) : void

Get the header for specific partNumber and Message UID

GetResponseSize ( string sResponse ) : long

Get the Size of the fetch command response response will look like "{}"

IsNilString ( string &sBodyStruct ) : bool

Returns true if starts with NIL

ParseAddress ( string &sBodyStruct, string &sString ) : bool

Parse one address and format the string

ParseAddressList ( string &sBodyStruct, string &sString ) : bool

Parse the address string

ParseBodyStructure ( string sMessageUID, string &sBodyStruct, XmlTextWriter oXmlBodyPart, string sPartPrefix, bool bFetchBody ) : bool

Parse the bodystructure and store as XML Element

ParseEnvelope ( string &sBodyStruct, ArrayList asAttrs ) : bool
ParseExtension ( string &sBodyStruct, string &sString ) : bool

Parse the extension in body structure

ParseLanguage ( string &sBodyStruct, string &sString ) : bool

Parse the language or list of languages in body structure

ParseParameters ( string &sBodyStruct, ArrayList asParams ) : bool

Parse the parameter in body structure

ParseQuotedString ( string &sBodyStruct, string &sString ) : bool

Parse the quoted string in body structure

ParseString ( string &sBodyStruct, string &sString ) : bool

Parse the string (seperated by spaces or parenthesis)

Restore ( bool bSelectFolder ) : void

Restore the connection using available old data Select the sFolder if previously selected

메소드 상세

CopyMessage() 공개 메소드

Copy Message
public CopyMessage ( string sUid, string sFolderName ) : void
sUid string Either UID or range of uid e.g 1:2
sFolderName string Folder where it needs to be copied
리턴 void

ExamineFolder() 공개 메소드

Examine the sFolder/mailbox after login
public ExamineFolder ( string sFolder ) : void
sFolder string Mailbox folder
리턴 void

Expunge() 공개 메소드

Expunge
public Expunge ( ) : void
리턴 void

FetchMessage() 공개 메소드

Fetch the full message
public FetchMessage ( string sMessageUID, XmlTextWriter oXmlWriter, bool bFetchBody ) : void
sMessageUID string Message UID
oXmlWriter System.Xml.XmlTextWriter
bFetchBody bool
리턴 void

FetchPartBody() 공개 메소드

Fetch the body for specified part
public FetchPartBody ( string sMessageUID, string sMessagePart, string &sData ) : void
sMessageUID string Message uid
sMessagePart string Message part
sData string
리턴 void

FetchPartHeader() 공개 메소드

Fetch Header of the message uid and part
public FetchPartHeader ( string sMessageUID, string sMessagePart, ArrayList asMessageHeader ) : void
sMessageUID string Message UID
sMessagePart string Message part
asMessageHeader System.Collections.ArrayList Output Array
리턴 void

GetMessageSize() 공개 메소드

Get the message size
public GetMessageSize ( string sUid ) : long
sUid string
리턴 long

GetQuota() 공개 메소드

Get the quota for specific folder
public GetQuota ( string sFolderName, bool &bUnlimitedQuota, int &nUsedKBytes, int &nTotalKBytes ) : void
sFolderName string Mailbox folder
bUnlimitedQuota bool Is unlimited quota
nUsedKBytes int Used quota in Kbytes
nTotalKBytes int Total quota in KBytes
리턴 void

HasEnoughQuota() 공개 메소드

Check if enough quota is available
public HasEnoughQuota ( string sFolderName ) : bool
sFolderName string Mailbox folder
리턴 bool

IsMultipart() 공개 메소드

Check if this message is multipart To Identify multipart message, the content-type is either multipart or rfc822
public IsMultipart ( ArrayList asHeader ) : bool
asHeader System.Collections.ArrayList
리턴 bool

LogOut() 공개 메소드

Logout the user: It logout the user and disconnect the connetion from IMAP server.
public LogOut ( ) : void
리턴 void

Login() 공개 메소드

Login to specified Imap host and default port (143)
public Login ( string sHost, string sUserId, string sPassword ) : void
sHost string Imap Server name
sUserId string User's login id
sPassword string User's password
리턴 void

Login() 공개 메소드

Login to specified Imap host and port
public Login ( string sHost, ushort nPort, string sUserId, string sPassword, bool sslEnabled = false ) : void
sHost string Imap server name
nPort ushort Imap server port
sUserId string User's login id
sPassword string User's password
sslEnabled bool
리턴 void

MoveMessage() 공개 메소드

Move message to specified folder
public MoveMessage ( string sUid, string sFolderName ) : void
sUid string UID of the message
sFolderName string Folder where you want to move the message
리턴 void

SearchMessage() 공개 메소드

Search the messages by specified criterias
public SearchMessage ( string asSearchData, bool bExactMatch, ArrayList asSearchResult ) : void
asSearchData string Search criterias
bExactMatch bool Is it exact search
asSearchResult System.Collections.ArrayList search result
리턴 void

SelectFolder() 공개 메소드

Select the sFolder/mailbox after login
public SelectFolder ( string sFolder ) : void
sFolder string mailbox folder
리턴 void

SetFlag() 공개 메소드

Store flag
public SetFlag ( string sUid, string flag, bool removeFlag = false ) : void
sUid string
flag string E.g \Deleted
removeFlag bool Remove the flaf
리턴 void