How do I assign a value to a MailMessage ReplyTo property?
Posted
by Zack Peterson
on Stack Overflow
See other posts from Stack Overflow
or by Zack Peterson
Published on 2010-05-03T14:24:14Z
Indexed on
2010/05/03
14:28 UTC
Read the original article
Hit count: 391
I want to set the ReplyTo value for a .NET MailMessage.
MailMessage.ReplyTo Property:
ReplyTo is obsoleted for this type. Please use ReplyToList instead which can accept multiple addresses.
MailMessage.ReplyToList Property:
Gets or sets the list of addresses to reply to for the mail message.
But, ReplyToList is ReadOnly.
I've tried to use the MailMessage.Headers property like this:
mail.Headers.Add("Reply-To", "[email protected]");
as described here: System.Web.Mail, OH MY!
But, that doesn't seem to work.
How do I set the value(s) of the MailMessage's ReadOnly property ReplyToList?
© Stack Overflow or respective owner