作为SmtpMail.SmtpServer的值的服务器,要安装什么软件吗?而且要有什么权限吗?

解决方案 »

  1.   

    有了邮件服务器还要有什么权限呢?
    为什么我用mail.163.com做它的值的时候就不行呢?
      

  2.   

    Dim objMessage As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage
            Dim objAttachment As System.Web.Mail.MailAttachment        objMessage.To = "[email protected]"
            objMessage.From = "[email protected]"
            objMessage.Subject = "Test"
            objMessage.Body = "Test"        objMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1") 'basic authentication
            objMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "b") 'set your username here
            objMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "password-test") 'set your password here        SmtpMail.SmtpServer = "stmp.163.com"
            SmtpMail.Send(objMessage)