AttachmentAsMimePart Property
Gets the attachment as MimePart object.

Namespace: MailBee.Mime
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 11.2.0 build 590 for .NET 4.5
Syntax
public MimePart AsMimePart { get; }

Property Value

Type: MimePart
A MimePart object representing the attachment of the mail message as a MIME part.
Remarks

MimePart corresponding to the given attachment provides access to those properties that are not available in Attachment but accessible in MimePart only.

To get the root part of the MIME parts tree of the message, use MimePartTree property of MailMessage object. MimePartTree MIME part contains all the MIME parts of the message.

Examples
This sample loads the message from .EML file and displays Content-Disposition of all attachments of this message. Content-Disposition value is not available in Attachment object but can be retrieved using MimePart object.
// To use the code below, import MailBee namespaces at the top of your code.
using MailBee;
using MailBee.Mime;

// The actual code (put it into a method of your class)

// Load the message from file.
MailMessage msg = new MailMessage();
msg.LoadMessage(@"C:\Docs\TestMail.eml");

// For every attachment...
foreach (Attachment attach in msg.Attachments)
{
    // ...show the filename and content-disposition of the attachment.
    Console.WriteLine("Attachment name: " + attach.Filename);
    Console.WriteLine("Disposition: " + attach.AsMimePart.Disposition);
    Console.WriteLine();
}
See Also