写了一个发邮件的程序怎么出错误了
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: