0
我发送邮件,但它给我的异常例外,在发送电子邮件
Mailbox name not allowed. The server response was: sorry, relaying denied from your location [182.72.17.210] (#5.7.1)
我的代码
public static string SendMailHtmlFromat(string sForm, string sTo, string sSub, string sMsg)
{
MailMessage mailmsg = new MailMessage();
mailmsg.To.Add(sTo);
mailmsg.From = new MailAddress(sForm);
mailmsg.Subject = sSub;
mailmsg.IsBodyHtml = true;
mailmsg.Body = sMsg;
try
{
//SmtpClient smtp = new SmtpClient("smtpout.secureserver.net", 25);
SmtpClient smtp = new SmtpClient("relay-hosting.secureserver.net", 25);
smtp.Credentials = new System.Net.NetworkCredential("[email protected]", "Smart123");
smtp.Send(mailmsg);
}
catch (Exception e)
{ }
return "";
}
是他们SmtpClient宣布
联系您的ISP(relay-hosting.secureserver.net)。乍一看,中继似乎是从您的位置否认... – 2010-12-01 06:55:24