7
我如何添加一個不同的電子郵件,然後在ReplayTo
字段發件人? 似乎MailMessage.ReplyTo
已被棄用,所以我試圖用ReplyToList
代替。asp.net mail add ReplyTo
但它告訴我,
Property or indexer 'System.Net.Mail.MailMessage.ReplyToList' cannot be assigned to -- it is read only
這裏是我到目前爲止的代碼:
var reply = new MailAddressCollection();
reply.Add("[email protected]");
MailMessage mail = new MailMessage(senderEmail,usr.Email,"subject","message");
mail.ReplyToList = reply;
var smtp = new SmtpClient();
smtp.Send(mail);
更多的檢查[這](http://stackoverflow.com/questions/21436827/unable-to-add-reply-to -in-郵件報頭-C-尖銳) – stom 2015-11-02 15:05:37