主頁 > 知識(shí)庫 > 發(fā)郵件的asp(CDONTS.NewMail)

發(fā)郵件的asp(CDONTS.NewMail)

熱門標(biāo)簽:縣域地圖標(biāo)注打印店 個(gè)人可以辦理400電話么 金昌電話機(jī)器人價(jià)格 修改地圖標(biāo)注 外呼系統(tǒng)API接口 怎么在地圖標(biāo)注自己 武夷山旅游地圖標(biāo)注 鳳臺(tái)百度地圖標(biāo)注店 萊西電子地圖標(biāo)注
formmail.htm
復(fù)制代碼 代碼如下:

html>
head>
meta http-equiv="Content-Type" content="text/html; charset=gb2312">
title>提交表單發(fā)送郵件/title>
/head>

body>
table width="97%" border="1" cellspacing="5" cellpadding="1" align="center" bgcolor="#EEFFF4" height="630">
  tr>
    td height="440">
      form action="sendMail.asp" target="_blank" method=post>
        input name="mailTo" type=hidden value="dayechg@163.com">
        input name="title" type="hidden" id="title" value="網(wǎng)上預(yù)定">
        table border=0 cellpadding=9 cellspacing=0 
                                width="100%">
          tbody>
            tr>
              td width="44%">
                div align=left>font size="2" color="#0000FF">姓nbsp; 名:/font> /div>/td>
              td width="56%">
                div align=left>font size="2" color="#0000FF">
                  input name=姓名>
              /font> /div>/td>
            /tr>
            tr>
              td width="44%">
                div align=left>font size="2" color="#0000FF">性nbsp; 別:/font> /div>/td>
              td width="56%">
                div align=left>font size="2" color="#0000FF">男
                      input CHECKED 
                                name=性別 type=radio value=男>
                  女
                  input name=性別 
                                type=radio value=女>
              /font> /div>/td>
            /tr>
            tr>
              td width="44%">
                div align=left>font size="2" color="#0000FF">年nbsp; 齡:/font> /div>/td>
              td width="56%">
                div align=left>font size="2" color="#0000FF">
                  input name=年齡>
                  */font> /div>/td>
            /tr>
            tr>
              td width="44%">
                div align=left>font size="2" color="#0000FF">聯(lián)系電話:/font> /div>/td>
              td width="56%">
                div align=left>font size="2" color="#0000FF">
                  input name=聯(lián)系電話>
                  */font> /div>/td>
            /tr>
            tr>
              td width="44%">
                div align=left>font size="2" color="#0000FF" class="unnamed1">E-mail:/font> /div>/td>
              td width="56%">
                div align=left>
                  p class="unnamed1">font size="2" color="#0000FF">
                    input name=Email>
                    * /font> /p>
              /div>/td>
            /tr>
            tr>
              td width="44%">font size="2" color="#0000FF">定票 :/font>/td>
              td width="56%"> font size="2" color="#0000FF">
                input name=定票 id="定票" value="請(qǐng)輸入詳細(xì)內(nèi)容">
              /font>font color="#0000FF"> /font>/td>
            /tr>
            tr>
              td width="44%">
                div align=left>font size="2" color="#0000FF">定餐:/font> /div>/td>
              td width="56%">
                div align=left>font size="2" color="#0000FF">
                  input name=定餐 id="定餐" value="請(qǐng)輸入詳細(xì)內(nèi)容">
              /font> /div>/td>
            /tr>
            tr>
              td width="44%" class="unnamed1">font color="#0000FF">定交通工具:/font>/td>
              td width="56%">font size="2" color="#0000FF">
                input name=定交通工具 id="定交通工具" value="請(qǐng)輸入詳細(xì)內(nèi)容">
              /font>/td>
            /tr>
            tr>
              td width="44%" class="unnamed1">font color="#0000FF">定房:/font>/td>
              td width="56%">font size="2" color="#0000FF">
                input name=定房 id="定房" value="請(qǐng)輸入詳細(xì)內(nèi)容">
              /font>/td>
            /tr>
            tr>
              td class="unnamed1">font color="#0000FF">定導(dǎo)游:/font> /td>
              td>font size="2" color="#0000FF">
                input name=定導(dǎo)游 id="定導(dǎo)游" value="請(qǐng)輸入您想定的導(dǎo)游條件">
              /font> /td>
            /tr>
            tr>
              td class="unnamed1">font color="#0000FF">定酒店:/font>/td>
              td>font size="2" color="#0000FF">
                input name=定酒店 id="定酒店" value="請(qǐng)輸入詳細(xì)內(nèi)容">
              /font>/td>
            /tr>
            tr>
              td colspan=2>
                div align=center>font size="2" color="#0000FF">
                  input name=Submit type=submit value=確認(rèn)>
                  input name=reset type=reset value=取消>
              /font> /div>/td>
            /tr>
          /tbody>
        /table>
        p>nbsp;/p>
    /form>/td>
  /tr>
/table>
/body>
/html>

sendmail.asp
復(fù)制代碼 代碼如下:

%
  function SendMail(mailTo,mailFrom,title,content)
'    on error resume next
    dim objCDOMail
    Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
    With objCDOMail
      .From =mailFrom
      .To =mailTo
      .Subject =title
      .Body =content
      .BodyFormat =0
      .MailFormat =0
      .Send
    End With
    Set objCDOMail = Nothing
    if err then
      SendMail=False
      err.Clear
    else
      SendMail=True
    end if
  end function

  if request.Form>"" then
      mailTo=trim(Request.form("mailTo"))
      mailForm=trim(Request.form("email"))
      title=trim(Request.form("title"))
      content=""
      for each mailKey in Request.form
        content=content"br>"  mailKey  ":"  trim(Request.form(mailKey))
      next
  elseif request.QueryString>"" then
      mailTo=trim(Request.QueryString("mailTo"))
      mailForm=trim(Request.QueryString("email"))
      title=trim(Request.QueryString("title"))
      content=""
      for each mailKey in Request.QueryString
        content=content"br>"  mailKey  ":"  trim(Request.QueryString(mailKey))
      next
  else
    response.Write("script language=javascript>alert('請(qǐng)用正確的方式發(fā)送Email');window.close();/script>")
    response.end
  end if
'  response.Write(content)
'  response.End()
  pdSendMail=SendMail(mailTo,mailForm,title,content)
  if not pdSendMail then
    response.Write("script language=javascript>alert('發(fā)送失敗');window.close();/script>")
  else
    response.Write("script language=javascript>alert('發(fā)送成功');window.close();/script>")
  end if
%>

標(biāo)簽:楚雄 上海 赤峰 清遠(yuǎn) 邢臺(tái) 通遼 南京 涼山

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《發(fā)郵件的asp(CDONTS.NewMail)》,本文關(guān)鍵詞  發(fā),郵件,的,asp,CDONTS.NewMail,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《發(fā)郵件的asp(CDONTS.NewMail)》相關(guān)的同類信息!
  • 本頁收集關(guān)于發(fā)郵件的asp(CDONTS.NewMail)的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章