电子邮件没有工作,无法接收电子邮件,雅虎电子邮件ID [英] Email not working,Not able to receive email for yahoo email id
问题描述
我卡住,无法收到来自雅虎ID电子邮件(如果发件人的电子邮件ID是雅虎的)。
code是工作的罚款没有给我任何错误,我收到的电子邮件Gmail的弗洛姆ID。
我使用本地主机(不活的服务器上的本地机)。
托管服务器:smtp.snapgrid.com
也可用于身份验证,启用SSL,使用适当的SSL端口。
在snapgrid我做检查,所以我得到了来自雅虎的邮件被阻止,该消息是,
I am stuck and not able to receive email from yahoo id(if the sender email id is of yahoo). code is working fine not giving me any error and i am receiving email fromm gmail id. i am using localhost (not in local machine on live server). hosting server : smtp.snapgrid.com also used authentication,enable ssl , using proper port for ssl. on snapgrid i do check so i got is mail from yahoo is blocked and the message is,
消息:
Type: blocked
Reason: 550 5.7.1 Unauthenticated email from yahoo.com is not accepted due to domain's
DMARC policy. Please contact administrator of yahoo.com domain if this was a legitimate
mail. Please visit http://support.google.com/mail/answer/2451690 to learn about DMARC
initiative.
请帮忙...
$ C C I用于发送的(其工作罚款只给了想法):
code i used to send is(its working fine just giving for idea):
方法1:
SmtpClient objSMTPClient = new SmtpClient();
objSMTPClient.Host = ConfigurationManager.AppSettings["strSMTPServer"];
string BODY_FORMAT = ConfigurationManager.AppSettings["EmailBodyContentFormat"];
MailMessage objMailMessage = new MailMessage(from.Trim(), to.Trim(), subject.Trim(), body.Trim());
objSMTPClient.UseDefaultCredentials = false;
if (BODY_FORMAT.ToUpper() == "HTML")
objMailMessage.IsBodyHtml = true;
else if (BODY_FORMAT.ToUpper() == "TEXT")
{
body = StripTags(body);
objMailMessage.IsBodyHtml = false;
objMailMessage.Body = body.ToString().Trim();
}
else
return false;
objSMTPClient.Send(objMailMessage);
return true;
方法2:
SmtpClient oMail = new SmtpClient();
MailMessage msg = new MailMessage();
MailAddress Madd = new MailAddress(from, "sunil");
oMail.Host = "smtp.gmail.com";
oMail.Port = 587;
oMail.EnableSsl = true;
oMail.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
oMail.Credentials = new NetworkCredential("sunil123@mydomain.com", "******");
oMail.Timeout = 20000;
msg.From = Madd;
msg.Body = body.ToString();
msg.To.Add(to);
msg.Subject = subject;
msg.IsBodyHtml = true;
oMail.Send(msg);
return true;
两者都是有工作无差错无缺陷运行....
both are working having no bug running without error....
推荐答案
如果您通过属于一个像雅虎,谷歌或Office365,他们预计该帐户的发送者名称,以匹配您使用发送服务器发送在从地址。
If you are sending via a server belonging to someone like Yahoo, Google or Office365 they expect the sender name of the account to match that that you're sending using in the from address.
例如,这将一个本地的SMTP服务器上的工作:
For example, this would work on a your local SMTP server:
Message.From = new MailAddress("GrandMasterFlush@domain.com");
不过,要得到它通过他人向雅虎将要求您发送这样的:
However, to get it to send via someone like Yahoo would require you to send it like this:
Message.From = new MailAddress("GrandMasterFlush@domain.com", "Grandmaster Flush");
如果提供的发件人姓名不完全匹配,该邮件不会被发送的帐户。
If the sender name provided does not exactly match that of the account the email will not get sent.
这篇关于电子邮件没有工作,无法接收电子邮件,雅虎电子邮件ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!