Sets a new unique value of Message-ID header and returns it.
A string containing the new unique value Message-ID value (without angle brackets).
Message-ID value is composed of the current thread ID + "." + the random string + "@" + the domain name. This value is assigned to MessageID property. Also, MailBee encloses it with angle brackets (<>) and puts it into Message-ID header value.
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.
This sample creates a new message and sets its Message-ID.
[C#] // 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);
[Visual Basic] ' To use the code below, import MailBee namespaces at the top of your code. Imports MailBee Imports MailBee.Mime ' The actual code (put it into a method of your class) Dim msg As New MailMessage Console.WriteLine(msg.MessageID) msg.SetUniqueMessageID("afterlogic.com") Console.WriteLine(msg.MessageID)
MailMessage Class | MailBee.Mime Namespace