MailBee.NET Objects 3.1

MailMessage.BodyParts Property

Gets all the text bodies of the message.

public TextBodyPartCollection BodyParts {get;}

Property Value

A reference to the collection containing all the text parts of the message. The default value is an empty collection.

Remarks

All the MIME parts of the message (except of multipart parts which are just containers of another parts) either fall into Attachments or BodyParts collections.

If ContentType of certain MIME part contains text string (for instance, it is text/plain or text/html) and this part is not attachment, this part of the message is considered to be a text part.

If you need to get the list or the hierarchy of all MIME parts of the message, use MimePartTree property.

Example

The example is available in TextBodyPartCollection topic.

See Also

MailMessage Class | MailBee.Mime Namespace | MimePartTree | Attachments