从Web服务器发送的电子邮件导致gmail被视为网络钓鱼。如何摆脱这个? [英] Email sent from web server causes gmail to treat as phishing. How to get rid of this?
问题描述
我将地址设置为xyz.support@gmail.com,名称为xyz 其中xyz是域名的名称,即我们的网站。
当我们使用Google的SMTP服务器时,我在发送时向Google提供了凭据,这不是问题。但是现在我使用自己的网络服务器的SMTP发送电子邮件。
当我查看gmail中的激活邮件时,我得到这个:
此消息可能未被发送:xyz.support@gmail.com了解更多报告钓鱼
有没有办法摆脱这个,以便gmail和其他客户端不显示此消息?
这里是代码:
var smtpClient = new SmtpClient();
var message = new MailMessage();
smtpClient.Host = _config.SMTPServer;
message.From = new MailAddress(xyz.support@gmail.com,xyz);
message.To.Add(newuser@gmail.com);
message.IsBodyHtml = true;
message.Subject =测试主题;
message.Body =Test Body;
smtpClient.Send(message);
谢谢
FROM地址的域必须匹配发送电子邮件的SMTP服务器的域,否则您的邮件被视为垃圾邮件。
这就解释了为什么你通过Google的SMTP服务器发送来避免错误。
I am sending account activation email from my .net app.
I set the from address to "xyz.support@gmail.com" and from name "xyz" where xyz is the name of the domain i.e. our website.
It was not a problem when we were using Google's SMTP server as I provided credentials to google during sending. But now I am using my own web server's SMTP to send the email.
When I view the activation email in gmail, I get this:
This message may not have been sent by: xyz.support@gmail.com Learn more Report phishing
Is there a way to get rid of this so that gmail and other client don't show this message?
Here is the code:
var smtpClient = new SmtpClient();
var message = new MailMessage();
smtpClient.Host = _config.SMTPServer;
message.From = new MailAddress("xyz.support@gmail.com", "xyz");
message.To.Add("newuser@gmail.com");
message.IsBodyHtml = true;
message.Subject = "Test subject";
message.Body = "Test Body";
smtpClient.Send(message);
Thanks
The domain of the FROM address has to match the domain of the SMTP server that is sending the email, otherwise your message is treated as as spam.
This explains why you avoid the "error" by sending via Google's SMTP server.
这篇关于从Web服务器发送的电子邮件导致gmail被视为网络钓鱼。如何摆脱这个?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!