<%@ Language=VBScript %>
<%
"==========================得放========================
" 參 數 設 置
"============================外章======================
"修改收信人電子(zǐ)郵件地址,表單裡的内容将發送到這個跳會信箱中
myemail ="test@test.com"
"修改收信人姓名
myname ="我的公司"
"修改SMTP服務器(qì)
smtpserver ="mail.test.com"
"修改SMTP服務器(qì)的用戶名和密碼
smtpuser ="test@test.com"愛窗
smtppwd ="123456"
"與相應SMTP服務器(qì)對應的郵件地址
"很多SMTP服務器(qì)除了要驗證用戶近了名和密碼外,還要驗證發件人地址,
"比如(rú)163.net的SMTP服務器(q在國ì)在檢查發信人郵件地址是不(bù)是以163通鐵.net
"結尾,否則不(bù)予發送,因此,使用相應的信箱做為(wèi林得)發信人信箱是必要的
smtpemail ="test@test.com"
"===============================機學===================
" 程 序 開(kāi) 始
"=============================家窗=====================
tname =Request("t1")
temail =Request("t2")
tother =Request("t3")
tsubject =Request("t4")靜有
tbody =Request("t5")
if tname <> "" and temail <行區;> "" then
set jmail=server.CreateObject ("jmail.和兒message")
jmail.Silent =true
jmail.Charset ="gb2312熱化"
if smtpemail <> "土門" then
jmail.From ="test@test.com"
else
jmail.From =temail
end if
jmail.FromName =tnam算媽e
jmail.ReplyTo =temail
jmail.Subject ="網上提交:" & tsubjec有可t
jmail.Body =tbody &a靜新mp; vbcrlf & vbcrlf & "聯系方式:"高身 & tother
jmail.AddRecipient mye近的mail,myname
jmail.MailServerUserN生現ame =smtpuser
jmail.MailServerPassWord =smtppwd
isgo=jmail.Send(smtpserver)
if isgo then
msg="提交成功!謝謝您的支持。"
else
msg="發送失敗!請檢查您的郵件地址是話不否填寫正确。"
end if
jmail.Close
set jmail=nothing
end if
%>
<html>
<head>
<meta http-equiv="Content-Type"木日 content="text/html; 購慢charset=gb2312">
<title>與我司聯系</titl刀這e>
</head>
<style type="text/css">
<!--
body,input,textarea{font-size: 12p見員x}
-->
</style>
<body>
<form action=jmail.as見聽p><%=msg%>
<br>您的姓名:
<br><input name=T1也著 size=29>
<br>電子(zǐ)郵件:
<br><input na森草me=T2 size=29>
<br>聯系方式:
<br><input name=T3 size=29>音睡
<br>文章主題:
<br><input name=T4 size=29>信不
<br>文章正文:
<br><textarea rows=6 col道雪s=28 name=T5>
</textarea>
<br><input t關頻ype="submit" value="确定">
</form>
</body></html>