SMTP, Get MessageId

Apr 23, 2013 at 9:32 AM
Edited Apr 23, 2013 at 9:36 AM
Hello,

I would like to get email MessageID (generated remotely by Smtp server) after I sent it with SmtpClient. It is possible?
Coordinator
Apr 23, 2013 at 11:13 AM
Hi.

I think it is impossible because MessageID is generated by remote server as you say.
But you can add your own id to SmtpMessage object by below code.

SmtpMessage mg = new SmtpMessage();
mg["X-Your-ID"] = "12345";

It may meet your requirement.

regards.