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.
[C#]
SmtpMail oMail = new SmtpMail("TryIt");
oMail.Headers.RemoveKey("Message-ID");
Message-ID is generated by SmtpMail automatically, if you want to use your customized Message-ID in the message, please use the following code.
[C#]
SmtpMail oMail = new SmtpMail("TryIt");
oMail.Headers.Insert(0, new HeaderItem("Message-ID", "mymessageid"));