发送电子邮件时,电子邮件发送失败 [英] Email Sending Failed when Send an Email
本文介绍了发送电子邮件时,电子邮件发送失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨专家
i希望使用c#代码发送电子邮件它会给出这样的错误
服务器遇到错误处理请求。异常消息是'System.Net.Mail.SmtpException:Transaction failed。服务器响应是:消息被拒绝:电子邮件地址未被验证。我使用电子邮件和电子邮件是gmail帐户的电子邮件
我能做什么..请帮助我..
Thnx提前..
Hi experts
i want to send an email using c# code it gives error like this
"The server encountered an error processing the request. The exception message is 'System.Net.Mail.SmtpException: Transaction failed. The server response was: Message rejected: Email address is not verified." i used from email and to email is gmail account emails
What can i do.. please help me..
Thnx in advance..
推荐答案
在smtp客户端配置中更改y 我们的端口: -
change your port in smtp client configuration:-
SmtpClient client = new SmtpClient("smtp.gmail.com");
client.Credentials = new NetworkCredential ("myEmail@gmail.com", "myPassword");
client.Port = 587;
client.EnableSsl = true;
client.Send(mail);
to
to
SmtpClient client = new SmtpClient("smtp.gmail.com");
client.Credentials = new NetworkCredential ("myEmail@gmail.com", "myPassword");
client.Port = 465;
client.EnableSsl = true;
client.Send(mail);
这篇关于发送电子邮件时,电子邮件发送失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文