Kirim email MailReplyTo ke Masalah

pemrograman

[ad_1]

Halo,
saat mengirim email saya ingin mengatur balasan tetapi tidak berhasil.
Ketika mengklik balas setelah menerima email, itu menunjukkan balasan dari mana email datang bukan apa yang telah saya tetapkan.

saya melakukan ini

XML
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>

Solusi 1

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);

selamat coding 🙂 🙂 🙂

[ad_2]

コメント

タイトルとURLをコピーしました