MailMessageSetUniqueMessageID Method |
Namespace: MailBee.Mime
Message-ID value is composed of the current thread ID + "." + the random string + "@" + the domain name. This value is then enclosed in angle brackets (<>) and assigned to MessageID property.
You can set Message-ID value manually using MessageID property.
Note |
---|
MailBee automatically sets unique Message-ID value when the mail message is being sent (or submitted to the pickup folder) unless MailMessage.Builder.SetMessageIDOnSend property is set to false. |
// 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) MailMessage msg = new MailMessage(); Console.WriteLine(msg.MessageID); msg.SetUniqueMessageID("afterlogic.com"); Console.WriteLine(msg.MessageID);