给你使用的smtp服务器有关。可能是它限制了你,你试试看。

解决方案 »

  1.   

    如下;我已经设置了smtp服务器信息,而且我通过outlook是可以外发的。strEmail = user.GetUserEmail(strName,strPass);
    //发送邮件
    MailMessage mail = new MailMessage();
    mail.From = strEmail;  //来源
    mail.To = txtEmail.Text.Trim();
    mail.Subject = "您朋友的信";
    mail.Body = txtMsg.Text;
    //这段是需要身份验证
    mail.Fields["http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"] = 1;
    mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "cuijian"); //set your username here
    mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "pass");
                    //smtp属性已经设置
    SmtpMail.SmtpServer="cybermail";
    mail.BodyFormat = System.Web.Mail.MailFormat.Html;
    System.Web.Mail.SmtpMail.Send(mail);
    ShowError("邮件发送成功!");