写了一个发邮件的程序怎么出错误了

childish 2003-08-18 05:33:53
try
{
System.Web.Mail.MailMessage myMail=new MailMessage();
myMail.From = "wsfz20000@163.com";
myMail.To = "wsfz@sina.263.com";
myMail.Subject = "MailTest";
myMail.Priority = MailPriority.Normal;
myMail.BodyFormat = MailFormat.Text;
myMail.Body = "Test";
SmtpMail.SmtpServer="202.194.22.26"; //your smtp server here
SmtpMail.Send(myMail);
}
catch(Exception e)
{
throw e;
}


错误提示:
服务器拒绝了一个或多个收件人地址。服务器响应为: 550 5.7.1 Unable to relay for w-sfz@sina.263.com
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.Runtime.InteropServices.COMException: 服务器拒绝了一个或多个收件人地址。服务器响应为: 550 5.7.1 Unable to relay for wsfz@sina.263.com

源错误:


行 41: catch(Exception e)
行 42: {
行 43: throw e;
行 44: }
行 45:

...全文
25 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
childish 2003-08-24
  • 打赏
  • 举报
回复
在IIS里怎么配置不需要认证的smtp服务
songquanyi 2003-08-19
  • 打赏
  • 举报
回复
邮件认证的问题 你用个不需认证的邮件就好了
panyee 2003-08-18
  • 打赏
  • 举报
回复
http://expert.csdn.net/Expert/topic/2138/2138445.xml?temp=.4311792
panyee 2003-08-18
  • 打赏
  • 举报
回复
202.194.22.26这个smtp服务器要身份验证, 你不能用smtpmail进行发邮件

childish 2003-08-18
  • 打赏
  • 举报
回复
那如何配置SMTP server 使得他能够relay message.
laochen 2003-08-18
  • 打赏
  • 举报
回复
According to the error message returned by SMTP server "550 5.7.1 Unable to relay for wsfz@sina.263.com", it means this SMTP server does not allow relaying message. You have to try another SMTP. If it requires POP before SMTP(some server use this to authenticate user), you have to create a POP3 session before your SMTP session.

Wish this helps
layershow 2003-08-18
  • 打赏
  • 举报
回复
wsfz@sina.263.com <----这个地址是对的?
是发不到这个地址去吧?
layershow 2003-08-18
  • 打赏
  • 举报
回复
wsfz@sina.263.com <----这个地址是对的?

62,041

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧