Imports System.Web.Mail
Imports System.Web.Util
Imports System.Xml
Imports System.Xml.XPath

Dim m As Mail.MailMessage = New Mail.MailMessage

        '/**////发件人地址
        Dim strmail As String = ConfigurationSettings.AppSettings("mailadd")
        Dim strmailpwd As String = ConfigurationSettings.AppSettings("mailpwd")

        m.From = strmail ' txtemail.Text

        '收件
        m.To = ConfigurationSettings.AppSettings("mailTo")

        m.Subject = "网站信息反馈"
        '  /**////邮件内容
        Dim strbody As String
        strbody = "客户名称:" + txtname.Text + Chr(10)
        strbody = strbody + "邮箱:" + txtemail.Text + Chr(10)
        strbody = strbody + "区域:" + txtarea.Text + Chr(10)
        strbody = strbody + "电话:" + txttel.Text + Chr(10)
        strbody = strbody + "品牌:" + dlpp.SelectedItem.Text + Chr(10)
        strbody = strbody + "车型:" + dlmod.SelectedItem.Text + Chr(10)

        strbody = strbody + "车型颜色:" + dlcl.SelectedItem.Text + Chr(10)
        m.Body = strbody
        '       /**////优先级
        m.Priority = MailPriority.Normal

        '        /**////设置邮件格式         
        m.BodyFormat = MailFormat.Text
      

        '//设置为需要用户验证
        m.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1")
        ' //设置验证用户名(把emailaddress改为你的验证用户名)
        m.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", strmail)
        ' //设置验证密码(把password改为你的验证密码)
        m.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", strmailpwd)

        ' //MM.Fields.Add("http://
        SmtpMail.SmtpServer = "smtp.tom.com" '//邮件服务器地址


        '   /**////发送邮件
        SmtpMail.Send(m)

 

相关文章:

  • 2022-02-20
  • 2021-06-18
  • 2022-03-09
  • 2021-12-13
  • 2021-11-15
  • 2021-07-13
猜你喜欢
  • 2021-09-30
  • 2021-07-04
  • 2022-02-07
  • 2021-05-27
  • 2022-02-26
相关资源
相似解决方案