MailMessageSetUniqueMessageID Method
Sets a new unique value of Message-ID header and returns it.

Namespace: MailBee.Mime
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.2.0 build 630 for .NET 4.5
public string SetUniqueMessageID(
	string domain


Type: SystemString
The domain name to be put in the MessageID field. If a null reference or an empty string, the local computer name is used.

Return Value

Type: String
A string containing the new unique value Message-ID value (with angle brackets).

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 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.
// 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();
See Also