永发信息网

Jmail 代码问题 谢谢帮忙

答案:1  悬赏:20  手机版
解决时间 2021-08-15 19:27

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>发送表单</title>
</head>
<body>
<script type="text/javascript" language="JavaScript" src="../../../util.metriserve.com/utild8f0.html?un=PAK752&amp;ws=1"></script>
<div id="lineup" ><img src="../images/lineup.gif" height="1" width="100%" border="0" hspace="0" vspace="0"></div>
<div id="menu" onMouseOver="clearTimeout(ST);" onMouseOut="ST=setTimeout('killfenetre()',500);"></div>



<%
firstname = Request.Form ("firstname")
lastname = Request.Form ("lastname")
jobtitle = Request.Form ("jobtitle")
company = Request.Form ("company")
address = Request.Form ("address")
town = Request.Form ("town")
zipcode = Request.Form ("zipcode")
country = Request.Form ("country")
phone = Request.Form ("phone")
fax = Request.Form ("fax")
email= Request.Form ("email")
office = Request.Form ("office")

Training_Needs= Request.Form ("Training_Needs")

text1 = Request.Form ("industrysector")
employees = Request.Form ("employees")
typeofcompany = Request.Form ("typeofcompany")
comment = Request.Form ("comment")
trainingme = Request.Form ("trainingme")
trainingcie = Request.Form ("trainingcie")
%>

<%
' 创建jmail对象:
Set JMail = Server.CreateObject("JMail.SMTPMail")

set mail=CreateObject("jmail.Message")
mail.Charset ="gb2312"
mail.From ="xuefaxinxiang@gmail.com"
mail.AddRecipient "xuefaxinxiang@gmail.com"
mail.AddRecipient office
mail.MailDomain="xuefaxinxiang.gmail.com"
mail.MailServerUserName = "xuefaxinxiang@gmail.com"
mail.MailServerPassWord = "*********(此处密码见谅)"
mail.subject="联系我们"

' 下面就是填表在内容区填写的内容,&是连接符,vbcrlf表示换行回车:

mess = mess & "---------------Webmail表单开始-------------------" & vbcrlf
mess = mess & "姓名:" & lastname & firstname & vbcrlf
mess = mess & "法名:" & jobtitle & vbcrlf
mess = mess & "归依年份:" & company & vbcrlf
mess = mess & "地址:" & address & vbcrlf
mess = mess & "城市:" & town & vbcrlf
mess = mess & "国家:" & country & vbcrlf
mess = mess & "电话:" & phone & vbcrlf
mess = mess & "电子邮件:" & email & vbcrlf
mess = mess & "---------------Webmail表单结束-------------------"
mail.Body = mess
On Error Resume Next
mail.Send("smtp.gmail.com")
mail.close()
set mail=nothing

response.write "感谢您填写相关信息,我们会尽快与您联系 ! "
%>



</body>
</html>
我总是收不到邮件 已经调试好几次了 高手们帮忙看看 那里代码写错了 汗

最佳答案

'***********************************************


Set jmail = Server.CreateObject("JMAIL.Message") '建立发送邮件的对象
jmail.silent = true '屏蔽例外错误,返回FALSE跟TRUE两值j
Jmail.logging = true '启用邮件日志
jmail.Charset = "GB2312" '邮件的文字编码为国标
jmail.ContentType = "text/html" '邮件的格式为HTML格式
jmail.AddRecipient 503131766@qq.com'邮件收件人的地址
jmail.From = "sjf@c-micro.com" '发件人的E-MAIL地址
jmail.MailServerUserName = "sjf@c-micro.com" '登录邮件服务器所需的用户名
jmail.MailServerPassword = "**********" '登录邮件服务器所需的密码
jmail.Subject = "中国聪明网!" '邮件的标题
jmail.Send("mail.c-micro.com") '执行邮件发送(通过邮件服务器地址)
jmail.Close() '关闭对象


'***********************************************

我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
怎样瘦小腿啊???要实际的,不要书面的
阿拉伯语“冰之子”用英语怎么写?
关羽一生换了多少双鞋
楼兰古国的存在时间
物联网讲座,物联网教育的培训课程包含哪些?
求下载小品的网站
为什么玩DNF会死机
怎样用电饭煲自制蛋糕
诗经表达感谢的句子,诗经中感恩的句子
求教古代类似于司马相如卓文君,扁鹊蔡桓公这
重庆索尼爱立信行货T700手机的最新报价是多少
无抵押贷款的办法?
p=G/s这里s代表什么
关于结婚迁户问题
怎样能让一个男人哭呢?
推荐资讯
有什么好喝的饮料?
跪求胡歌喵消息来了…哪位大哥有mp3格式的请
暴风挑战b。ug被封了?
谁能送我一身好看的Q秀
怎样恢复信心
宋词三百首鉴赏大全集,古代人王导诗词鉴赏大
Br2与I2分别遇CCL4会怎么样?(23 19:54:36)
利川市恩施观景ktv地址在哪,我要去那里
we are a 请问下各位大大
幼儿园购进90套玩具,老师按7:5:3分配给大班
无线座机电话卡怎样放在手机里使用
好寂寞游戏去哪下呀?有图或地址回下?
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?