MailBee.NET Objects 4.0

MimePart.Parse Method 

Creates a new instance of MimePart object from the specified MIME data.

public static MimePart Parse(
   byte[] dataToParse
);

Parameters

dataToParse
The byte array containing the MIME part contents (the header and the body).

Return Value

A reference to the created MimePart object.

Remarks

You can use this method to parse standalone MIME parts rather than entire messages. For instance, it's possible to tell IMAP server to return a particular MIME part. You can then parse the received data using Parse method. Then, you can create Attachment object from the created MimePart.

Exceptions

Exception Type Condition
MailBeeInvalidArgumentException dataToParse is a null reference (Nothing in Visual Basic).

Example

The example is available in Envelope.GetEnvelopeItem topic.

See Also

MimePart Class | MailBee.Mime Namespace | MimePartCollection | MailMessage