MimePart Class |
Namespace: MailBee.Mime
The MimePart type exposes the following members.
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetAllParts |
Returns the collection containing this MIME part and all its sub-parts (if any) as a flat list.
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetRawData |
Gets the raw data of the MIME part source.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Parse |
Creates a new instance of MimePart object from the specified MIME data.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
Boundary |
Gets the string which delimits MIME parts nested into this part.
| |
Charset |
Gets the name of the character encoding of the MIME part.
| |
ContentID |
Gets the Content-ID value of the MIME part.
| |
ContentLocation |
Gets the content location of the MIME part.
| |
ContentType |
Gets the content type of the MIME part as a string.
| |
Description |
Gets the content description of the MIME part as a string.
| |
Disposition |
Gets the content disposition of the MIME part.
| |
Filename |
Gets the filename of the MIME part as specified in the message.
| |
Headers |
Gets or sets the collection of the MIME part headers.
| |
IsComplete |
Indicates whether the MIME part of the message was received completely.
| |
IsFile |
Indicates whether the MIME part is a file.
| |
IsInline |
Indicates whether the MIME part is inline.
| |
IsMessageInside |
Indicates whether the MIME part is an encapsulated mail message.
| |
IsRelated |
Indicates whether the MIME part is related to other MIME parts of this message.
| |
MailEncodingOriginal |
Gets the name of the mail transfer encoding of the MIME part.
| |
Name |
Gets the name of the MIME part.
| |
PartType |
Gets the category of the MIME part content.
| |
RawHeader |
Gets a string containing the header section of the MIME part in the original form.
| |
Size |
Gets the size of the MIME part content in bytes.
| |
SubParts |
Gets the collection of all immediate sub-parts of the MIME part.
|
Each e-mail message consists of one or more MIME parts. Each MIME part consists of a header section and (optionally) a body section. The body section may contain the actual content (text, binary data, etc) or other MIME parts nested into this part. Attachments, text body parts and the message itself are examples of MIME parts.
During parsing the message, MailBee creates a tree of linked MimePart and MimePartCollection objects.
To access the MIME part which corresponds to the message itself (the root part), use MimePartTree property. To access the MIME part which corresponds to a certain attachment, use AsMimePart property of that Attachment object. To access the MIME part which corresponds to a certain text body part, use AsMimePart property of that TextBodyPart object.
Because most properties of MimePart and Attachment object have the same meaning (and every attachment is internally a MIME part - you can get it with Attachment.AsMimePart property), the documentation on these properties usually refers to their versions in Attachment class. Some MimePart properties, however, not applicable or important for Attachment object and thus can only be found in MimePart class.
It's usually not need to create MimePart objects manually. To compose a message consisting of multiple parts, add attachments or text body parts to it. MailBee will produce MIME parts for them during building the message.
However, it's possible to create an instance of MimePart class using Parse(Byte) method.