SmtpMail.MessageID Property


Gets the Message-ID of the e-mail message.

[Visual Basic]
Public Property MessageID As String
[C#]
public string MessageID {get;}
[C++]
public: __property String^ get_MessageID();
[JScript]
public function get MessageID() : String;

Property Value

Gets a String value indicating the Message-ID of the e-mail message.

Remarks

Message-ID is generated by SmtpMail automatically, if you don't want Message-ID in the message, please use the following code.

Example

[C# - Remove Message-ID Header]
// Message-ID is generated by SmtpMail automatically, 
// if you don't want Message-ID in the message, please
// use the following code.
SmtpMail oMail = new SmtpMail("TryIt");
oMail.Headers.RemoveKey("Message-ID");


[C# - Customized Message-ID Header] // Message-ID is generated by SmtpMail automatically, // if you want to use your customized Message-ID in the message, // please use the following code. SmtpMail oMail = new SmtpMail("TryIt"); oMail.Headers.Insert(0, new HeaderItem("Message-ID", "mymessageid"));