C# 클래스 Microsoft.Legal.MatterCenter.Utility.MailMimeReader

Reads MIME based emails streams and files.
상속: IDisposable
파일 보기 프로젝트 열기: Microsoft/mattercenter 1 사용 예제들

공개 메소드들

메소드 설명
ConvertToDateTime ( string date ) : System.DateTime

Tries to convert string to date If there is a run time error, the smallest possible date is returned

ConvertToMailAddress ( string address ) : System.Net.Mail.MailAddress

Tries to convert a string into an email address

DecodeByteArrayToString ( byte byteArray, Encoding byteEncoding ) : string

Converts byte array to string, using decoding as requested

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

GetEmail ( Stream emailStream ) : MailMessageParser

Gets an email from the supplied Email Stream and processes it.

GetEmail ( string mailPath ) : MailMessageParser

Gets an email from the supplied Email Stream and processes it.

MailMimeReader ( ) : System

Initializes a new instance of the MailMimeReader class

ProcessReceivedDate ( string headerValue ) : System.DateTime

To process received date from the header field

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources.

ReadMultipleLine ( string &response ) : bool

read one line in multiline mode from the Email stream.

비공개 메소드들

메소드 설명
AddChildPartsToParent ( MailMessageParser child, MailMessageParser parent ) : void

Add all attachments and alternative views from child to the parent

AddMailAddresses ( string addresses, MailAddressCollection addressCollection ) : void

find individual addresses in the string and add it to address collection

ConvertToTransferEncoding ( string transferEncodingString ) : TransferEncoding

converts TransferEncoding as defined in the RFC into a .NET TransferEncoding .NET doesn't know the type "bit8". It is translated here into "bit7", which requires the same kind of processing (none).

ParentBoundaryFound ( string response, string parentBoundaryStart, string parentBoundaryEnd, MimeEntityReturnCode &boundaryMimeReturnCode ) : bool

Check if the response line received is a parent boundary

ProcessDelimitedBody ( MailMessageParser message, string boundaryStart, string parentBoundaryStart, string parentBoundaryEnd ) : MimeEntityReturnCode

Processes the delimited body of Mail Mime Entity.

ProcessHeaderField ( MailMessageParser message, string headerField ) : void

Convert one MIME header field and update message accordingly

ProcessMimeEntity ( MailMessageParser message, string parentBoundaryStart ) : MimeEntityReturnCode

Process a MIME entity A MIME entity consists of header and body. Separator lines in the body might mark children MIME entities

RemoveBrackets ( string parameterString ) : string

removes leading '<' and trailing '>' if both exist

SaveAttachment ( MailMessageParser message ) : void

each attachment is stored in its own MIME entity and read into this entity's ContentStream. SaveAttachment creates an attachment out of the ContentStream and attaches it to the parent MIME entity.

SaveMessageBody ( MailMessageParser message, string contentString ) : void

Copies the content found for the MIME entity to the MailMessageParser body and creates a stream which can be used to create attachments and alternative views.

메소드 상세

ConvertToDateTime() 공개 메소드

Tries to convert string to date If there is a run time error, the smallest possible date is returned
public ConvertToDateTime ( string date ) : System.DateTime
date string string to be converted to Date object
리턴 System.DateTime

ConvertToMailAddress() 공개 정적인 메소드

Tries to convert a string into an email address
public static ConvertToMailAddress ( string address ) : System.Net.Mail.MailAddress
address string string mail address to parse
리턴 System.Net.Mail.MailAddress

DecodeByteArrayToString() 공개 정적인 메소드

Converts byte array to string, using decoding as requested
public static DecodeByteArrayToString ( byte byteArray, Encoding byteEncoding ) : string
byteArray byte Stream byte array.
byteEncoding System.Text.Encoding byte encoding to use
리턴 string

Dispose() 공개 메소드

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

Releases unmanaged and - optionally - managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
리턴 void

GetEmail() 공개 메소드

Gets an email from the supplied Email Stream and processes it.
public GetEmail ( Stream emailStream ) : MailMessageParser
emailStream Stream The email stream object
리턴 MailMessageParser

GetEmail() 공개 메소드

Gets an email from the supplied Email Stream and processes it.
public GetEmail ( string mailPath ) : MailMessageParser
mailPath string string that designates the path to a .EML file
리턴 MailMessageParser

MailMimeReader() 공개 메소드

Initializes a new instance of the MailMimeReader class
public MailMimeReader ( ) : System
리턴 System

ProcessReceivedDate() 공개 메소드

To process received date from the header field
public ProcessReceivedDate ( string headerValue ) : System.DateTime
headerValue string Header value from the headers of the mail
리턴 System.DateTime

ReadMultipleLine() 보호된 메소드

read one line in multiline mode from the Email stream.
protected ReadMultipleLine ( string &response ) : bool
response string line received
리턴 bool