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)

 

posted on 2006-05-30 09:23  公木子  阅读(164)  评论(0编辑  收藏  举报