请大家帮忙看看为什么出这个错误!
这是代码部分
void test()
{
string Userid= "wen ";
string Email = "wenyiyi1982@163.com ";
string html = " <A href= 'http://ChinaPaper.com/validate.aspx?UserID= ' " + Userid + " ' &Email= ' " + Email + " ' '> 点击此处激活 </A> ";
MailMessage Message = new MailMessage();
Message.From = "wen48144403@163.com ";
Message.To = Email;
Message.Subject = "这是激活邮件 ";
Message.Body = html;
Message.BodyFormat = MailFormat.Text; //文本类型 Message.Priority = MailPriority.Normal; //一般优先级
SmtpMail.Send(Message);
}
protected void Button1_Click(object sender, EventArgs e)
{
test();
}
错误提示:
服务器拒绝了一个或多个收件人地址。服务器响应为: 550 5.7.1 <wenyiyi1982@163.com> ... Relaying denied. IP name possibly forged [61.171.165.135]
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.Runtime.InteropServices.COMException: 服务器拒绝了一个或多个收件人地址。服务器响应为: 550 5.7.1 <wenyiyi1982@163.com> ... Relaying denied. IP name possibly forged [61.171.165.135]
源错误:
行 135: //这是一个静态(Static)属性,所以,不需要实例化类
行 136:
行 137: SmtpMail.Send(Message);
行 138: // Response.Write( " <script language=javascript> alert( '发送成功! '); </script> ");