MimePartGetRawData Method
Gets the raw data of the MIME part source.

Namespace: MailBee.Mime
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 11.2.0 build 590 for .NET 4.5
Syntax
public byte[] GetRawData()

Return Value

Type: Byte
A byte array containing the complete source, with headers and body section, of the MIME part, or an empty array if the part had no MIME source.
Remarks

This property can be used to get not yet parsed, not yet decoded source of the MIME part.

In case if the MIME part was generated by MailBee rather than parsed from a MIME source(this will occur if you construct a new e-mail message rather than parse an existing one), this property will return a byte array of zero length. If you need to workaround this, tell MailBee to build the MIME representation of the message, such as with msg.Builder.Apply() call where msg is MailMessage instance. After that, you can use this method to get the newly generated MIME source. Again, this is not required for existing messages (which have MIME source from the start).

If you need to get binary content, parsed and decoded, of an attachment, use Attachment.GetData method.

See Also