如何使用“邮件来自"的gmail发送邮件不同的“使用的电子邮件帐户发送" [英] How to send mail with gmail that "mail from" different "email account used send"

查看:114
本文介绍了如何使用“邮件来自"的gmail发送邮件不同的“使用的电子邮件帐户发送"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hj,我想使用gmail发送邮件,该邮件中来自"的邮件来自其他使用的电子邮件帐户":
示例:

Hj, i want send mail with gmail that "mail from" different "email account used send" :
Example:

MailMessage mail = new MailMessage(); 
mail.Subject = "Subject"; 
mail.Body = "Main body goes here";

mail.From = new System.Net.Mail.MailAddress("my_email@gmail.com","My Name"); 
mail.IsBodyHtml = false; 
mail.BodyEncoding = System.Text.Encoding.Unicode; 
mail.SubjectEncoding = System.Text.Encoding.Unicode;
 
mail.To.Add("mailto@yahoo.com");
 
NetworkCredential cred = new NetworkCredential(
"mail_using_send@gmail.com", //from email address of the sending account
"password"); //password of the sending account
 
SmtpClient smtp = new SmtpClient("smtp.gmail.com"); 
smtp.UseDefaultCredentials = false; 
smtp.EnableSsl = true;
 
smtp.Credentials = cred;  
smtp.Port = 587;
 
smtp.Send(mail);



我使用电子邮件"my_email@gmail.com"从收件人电子邮件可以回复"my_email@gmail.com"的人发送邮件.但是当我测试回复时,邮件回复仍然是"mail_using_send@gmail.com".我希望邮件回复为"my_email@gmail.com".怎么做呢?谢谢提前:)



I using email "my_email@gmail.com" to make mail from that who recipient email can reply to "my_email@gmail.com". But when i test reply , mail reply still is "mail_using_send@gmail.com". I want mail reply is "my_email@gmail.com". How can make it? Thanks advance :)

推荐答案

可能设置了ReplyTo问题.可以帮忙吗?
http://msdn.microsoft.com/en-us/library/system.net.mail.mailmessage.replyto.aspx [ ^ ]或
Perhaps setting ReplyTo prob. can help ?
http://msdn.microsoft.com/en-us/library/system.net.mail.mailmessage.replyto.aspx[^] or http://msdn.microsoft.com/en-us/library/system.net.mail.mailmessage.replytolist.aspx[^]


那是而不是邮件发件人",这是标题发件人:"的内容. 与帐户无关;因此此标头的内容可以是任何内容.

您为什么认为垃圾邮件发送者很难被抓住?因为创建电子邮件标准时假定Internet上的大多数参与者都是诚实的人,所以绝大多数人的确没有作弊.这就是为什么创建标准非常宽松且有点草率的原因.发送者的身份未传递或检查.几乎所有东西都可能以各种方式被伪造.

—SA
That''s not "mail from", this is the content of the header "From: ". It has nothing to do with the account; so the content of this header can be anything at all.

Why do you think the spammers are very hard to catch? Because e-mail standards were created where most players on Internet were assumed to be honest people, and the absolute majority of people really did not cheat. That''s why the standards were created very relaxed and kind of sloppy. Identity of the sender is not passed on or checked up. Nearly everything could be faked in every way.

—SA


这篇关于如何使用“邮件来自"的gmail发送邮件不同的“使用的电子邮件帐户发送"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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