MailMessageMessageID Property |
Namespace: MailBee.Mime
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 |
---|
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. |
// 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);