为什么我得到的错误是-------“SendUsing”配置值无效。 

解决方案 »

  1.   

    是用jmail发的吗,有无设置邮件服务器验证
      

  2.   

    smtp要验证吧mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", smtpUserName); mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", smtpUserPwd); 
      

  3.   

    '以下是完整的代码Dim email As New System.Web.Mail.MailMessage
    email.To = "[email protected]"
    email.From = "[email protected]"
    email.Body = "MessageText"
    email.Subject = "SubjectText"
    email.BodyFormat = Web.Mail.MailFormat.Textemail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1")
    '将以下三行中中的,第2个参数,设为你的smtp相应值,即可
    email.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserver", "smtp.163.net")
    email.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "smtpuser")
    email.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "password")System.Web.Mail.SmtpMail.Send(email)