MailMessageMessageID Property
Gets or sets the Message-ID header of the message.

Namespace: MailBee.Mime
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.4 build 677 for .NET 4.5
Syntax
public string MessageID { get; set; }

Property Value

Type: String
A string containing the Message-ID. For newly created messages, it's an empty string; for existing messages (received from mail servers, loaded from disk, etc), it's set from the Message-ID header value during parsing the message.
Remarks
During sending the message or submitting it to the pickup folder, this property is set to a new unique value (unless MailMessage.Builder.SetMessageIDOnSend is false).

You can also set Message-ID manually using SetUniqueMessageID(String) method.

In MIME, Message-ID value is enclosed in angle brackets (<>). This property returns Message-ID value with angle brackets. Also, if you assign a new value without trailing angle brackets, they will be added to MessageID value automatically.

Note Note
Message-ID (MID) is NOT the same as Unique-ID (UID) which is assigned to each message in the mailbox by the POP3 or IMAP4 server.
Examples
This sample loads the message from .EML file and displays the Message-ID of this message.
// 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");

// Show the Message-ID.
Console.WriteLine("The message ID is " + msg.MessageID);
See Also