本文介绍了发送邮件MailReplyTo发布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 您好, 发送邮件时我想设置回复但是它无法正常工作。 点击收到邮件后回复邮件时显示回复邮件来吧不是我设置的。 i我这样做 System.Net.Mail.MailMessage oMailMessage = new System.Net.Mail.MailMessage(); < pre lang = cs > oMailMessage.ReplyToList.Add(MailReplyTo); oMailMessage.Headers.Add(& quot; Reply-To& quot;,MailReplyTo); < / pre > 解决方案 System.Net.Mail.MailMessage oMailMessage = new System.Net.Mail.MailMessage(); string MailReplyTo [email protected]; oMailMessage.To.Add([email protected]); oMailMessage.From = new System.Net.Mail.MailAddress([email protected]); oMailMessage.Subject =test; oMailMessage.Body =嗨这是测试邮件; oMailMessage.ReplyToList.Add(MailReplyTo); oMailMessage.Headers.Add(reply-To,MailReplyTo); SmtpClient客户端=新的SmtpClient(MyServer,25); client.Credentials = new NetworkCredential([email protected],joPassword); client.Send(oMailMessage); 快乐编码:) :) :) Hello,while sending mail i want to set reply to but it's not working.When click on reply to after getting mail it show reply to from where mail come not what i have set.i am doing this System.Net.Mail.MailMessage oMailMessage = new System.Net.Mail.MailMessage();<pre lang="cs">oMailMessage.ReplyToList.Add(MailReplyTo); oMailMessage.Headers.Add("Reply-To", MailReplyTo);</pre> 解决方案 System.Net.Mail.MailMessage oMailMessage = new System.Net.Mail.MailMessage(); string MailReplyTo ="[email protected]"; oMailMessage.To.Add("[email protected]"); oMailMessage.From = new System.Net.Mail.MailAddress("[email protected]"); oMailMessage.Subject = "test"; oMailMessage.Body = "Hi this is test Mail"; oMailMessage.ReplyToList.Add(MailReplyTo); oMailMessage.Headers.Add("reply-To", MailReplyTo); SmtpClient client = new SmtpClient("MyServer", 25); client.Credentials = new NetworkCredential("[email protected]", "joPassword"); client.Send(oMailMessage);happy coding :) :) :) 这篇关于发送邮件MailReplyTo发布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-12 17:22