2017年北京申请限价房:请教直接发关邮箱问题

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/30 10:23:25
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<title>邮件发送结果</title>
<%
if trim(request.Form("sendmail"))="" then
response.write "没有找到要发送的目标邮件地址!"
response.end
end if

if request.Form("submit")="" then
response.write "提交按钮的标签是任意的,但名称一定是submit"
response.End()
end if

dim body,username,password,smtp,subject,bottom
body=""
username="rose@tom.comss"
password="ddd"
smtp="smtp.163.net"
subject="客户给您的留言信息!"
bottom="----"

set JmailMsg=server.createobject("jmail.message")
JmailMsg.mailserverusername=username
JmailMsg.mailserverpassword=password

JmailMsg.addrecipient trim(request.Form("email"))
JmailMsg.from=username
JmailMsg.fromname="自动发送的邮件!"

JmailMsg.charset="gb2312"
JmailMsg.logging=true
JmailMsg.silent=true
JmailMsg.subject=subject
for each items in request.form
if items="sendmail" or items="submit" then
:
else
body=body&items&":"&request.form(items)&"<br>"
end if
next
body=body&bottom
JmailMsg.htmlbody=body&"<br>我们的邮件采用了HTML格式,但是您的邮件查看软件可能不支持,如果你使用的是我公司的企业邮局,您可以点击上面的《浏览超文本格式邮件》链接来查看该邮件。 "
JmailMsg.send(smtp)
if err then
'if not JmailMsg.send(smtp) then
err.clear
response.write "发送失败!可能是服务器忙,请稍候重发一次。"
response.write "<br>Submit Fail,Please Re Submit."
else
response.write "发送成功!"
response.write "<br>Submit OK!"
end if
JmailMsg.close
set JmailMsg=nothing
%>
显示发送成功,但邮箱里却没有收到邮件。
请各位高手帮忙。争

再发一次试试咯。看看问题是不是重复出现