<%@ Language=VBScript %> "修改收信人电子邮件地址,表单里的内容将发送到这个信箱中 "修改收信人姓名 "修改SMTP服务器 "修改SMTP服务器的用户名和密码 "与相应SMTP服务器对应的邮件地址 "================================================== tname =Request("t1") if tname <> "" and temail <> "" then set jmail=server.CreateObject ("jmail.message") if smtpemail <> "" then jmail.FromName =tname isgo=jmail.Send(smtpserver) jmail.Close
<%
"==================================================
" 参 数 设 置
"==================================================
myemail ="test@test.com"
myname ="我的公司"
smtpserver ="mail.test.com"
smtpuser ="test@test.com"
smtppwd ="123456"
"很多SMTP服务器除了要验证用户名和密码外,还要验证发件人地址,
"比如163.net的SMTP服务器在检查发信人邮件地址是不是以163.net
"结尾,否则不予发送,因此,使用相应的信箱做为发信人信箱是必要的
smtpemail ="test@test.com"
" 程 序 开 始
"==================================================
temail =Request("t2")
tother =Request("t3")
tsubject =Request("t4")
tbody =Request("t5")
jmail.Silent =true
jmail.Charset ="gb2312"
jmail.From ="test@test.com"
else
jmail.From =temail
end if
jmail.ReplyTo =temail
jmail.Subject ="网上提交:" & tsubject
jmail.Body =tbody & vbcrlf & vbcrlf & "联系方式:" & tother
jmail.AddRecipient myemail,myname
jmail.MailServerUserName =smtpuser
jmail.MailServerPassWord =smtppwd
if isgo then
msg="提交成功!谢谢您的支持。"
else
msg="发送失败!请检查您的邮件地址是否填写正确。"
end if
set jmail=nothing
end if
%>