发送邮件MailReplyTo发布 [英] Send mail MailReplyTo to Issue

查看:713
本文介绍了发送邮件MailReplyTo发布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

发送邮件时我想设置回复但是它无法正常工作。

点击收到邮件后回复邮件时显示回复邮件来吧不是我设置的。



i我这样做

 System.Net.Mail.MailMessage oMailMessage = new System.Net.Mail.MailMessage(); 
< pre < span class =code-attribute> 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 =reply2Himanshu@gmail.com;
oMailMessage.To.Add(himanshu.joshi@yahoo.com);
oMailMessage.From = new System.Net.Mail.MailAddress(jo.him@gmail.com);
oMailMessage.Subject =test;
oMailMessage.Body =嗨这是测试邮件;
oMailMessage.ReplyToList.Add(MailReplyTo);
oMailMessage.Headers.Add(reply-To,MailReplyTo);
SmtpClient客户端=新的SmtpClient(MyServer,25);
client.Credentials = new NetworkCredential(jo.him@gmail.com,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(&quot;Reply-To&quot;, MailReplyTo);</pre>

解决方案

System.Net.Mail.MailMessage oMailMessage = new System.Net.Mail.MailMessage();
        string MailReplyTo ="reply2Himanshu@gmail.com";
        oMailMessage.To.Add("himanshu.joshi@yahoo.com");
        oMailMessage.From = new System.Net.Mail.MailAddress("jo.him@gmail.com");
        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("jo.him@gmail.com", "joPassword");   
         client.Send(oMailMessage);




happy coding :) :) :)


这篇关于发送邮件MailReplyTo发布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆