Link to home
Start Free TrialLog in
Avatar of djcheeky
djcheekyFlag for United States of America

asked on

Setting Email Header Message Id property in C#

Hi

I am working with the following simple mail message, seen in the code below.

How do I set the Message Id proprty contained in the header information for an outgoing mail??

I would like to do something like:
msgClient.Headers.MessageId = messageId;

I see that the MailMessage class has the following property:
public NameValueCollection Headers

I suspect I would need to use that, but how??

Thanks


MailMessage msgClient = new MailMessage();
msgClient.From = "test@test.com"

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Todd Gerbert
Todd Gerbert
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of djcheeky

ASKER

Simple enough hahaha. Thanks!