Gets or sets the collection of the MIME part headers.
Namespace: MailBee.MimeAssembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax public HeaderCollection Headers { get; set; }
Public Property Headers As HeaderCollection
Get
Set
Property Value
Type:
HeaderCollection
A
HeaderCollection object containing the headers of the MIME part.
Remarks Examples This sample loads the message from .EML file and displays all headers of each MIME part of this message.
using MailBee;
using MailBee.Mime;
MailMessage msg = new MailMessage();
msg.LoadMessage(@"C:\Docs\TestMail.eml");
foreach (MimePart part in msg.MimePartTree.GetAllParts())
{
Console.WriteLine(string.Format("MimePart {0} headers values:", part.Name));
foreach (Header hdr in part.Headers)
{
Console.WriteLine(hdr.Value);
}
}
Imports MailBee
Imports MailBee.Mime
Dim msg As New MailMessage
msg.LoadMessage("C:\Docs\TestMail.eml")
For Each part As MimePart In msg.MimePartTree.GetAllParts()
Console.WriteLine(String.Format("MimePart {0} headers values:", part.Name))
For Each hdr As Header In part.Headers
Console.WriteLine(hdr.Value)
Next
Next
See Also