我用jmail发邮件,提示成功,为何收不到邮件呢?

xxw365 2005-11-11 07:57:42
<%
Set JMail=Server.CreateObject("JMail.Message")
JMail.Subject = "toppic"
JMail.Body = "mailbody"
JMail.Silent = true
JMail.Charset="gb2312"
JMail.ContentType = "text/html"
JMail.From = "xxw820105@163.com"
JMail.FromName = "发送者姓名"
JMail.MailServerUserName = "xxw820105@163.com"
JMail.MailServerPassword = "8537283"
JMail.Maildomain = "smtp.163.com"
JMail.Priority = 1
JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
JMail.AddRecipient "488705@qq.com"
isgo = JMail.Send("xxw820105:8537283@smtp.163.com")
JMail.close()
set JMail = nothing
if isgo =true then
sendmsg="<p>· 您的注册信息已经发往您的邮箱,请注意查收!</p>"
else
sendmsg="<p>· 邮件系统繁忙,注册信息资料未能发送到您的邮箱!</p>"
end if
response.write(sendmsg)
%>
...全文
244 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
wxf0104 2005-11-17
  • 打赏
  • 举报
回复
这个百分百可以用,因为我现在系统正在用的。供楼主参考。


<%if request("usermail")<>"" then
usermail=request("usermail")
else
usermail="暂无"
end if

if request("username")<>"" then
userName=request("userName")&request("sex")
else
userName="暂无"
end if





if request("tel")<>"" then
tel=request("tel")
else
tel="暂无"
end if

title=request("title")
txtSubject="网站邮件系统转发的用户信件"
txtBody2=request("txtBody2")
txtToAdress=request("fh_mail")
fh_name=request("fh_name")
txtBody1=fh_name&"您好,这是网站邮件系统转发的邮件,发件用户信息如下:"&vbCrLf&"用户名:"&userName&vbCrLf&"联系电话:"&tel&vbCrLf&"邮箱:"&usermail
mail_x="-------------------------------------------------------"

Dim SMTP

Set SMTP = CreateObject("jmail.Message")

SMTP.Charset = "GB2312"
SMTP.Silent = False

SMTP.Priority = 3

txtFromName="网站组"
txtFromAdd="abs"
txtFromPs="1234"
txtFromAddress="123@sohu.com"
txtBody=txtBody1&vbCrLf&vbCrLf&mail_x&vbCrLf&vbCrLf&"邮件标题:"&title&vbCrLf&vbCrLf&"邮件内容如下:"&vbCrLf&txtBody2


SMTP.FromName = Trim(txtFromName)
SMTP.MailServerUserName = Trim(txtFromAdd)
SMTP.MailServerPassWord = Trim(txtFromPs)
SMTP.From = Trim(txtFromAddress)


SMTP.Subject = Trim(txtSubject)
SMTP.AddRecipient Trim(txtToAdress)
SMTP.Body = txtBody


isgo=SMTP.Send ("smtp.sohu.com")
SMTP.close()
Set SMTP = Nothing

if isgo =true then%>
<p>· 邮件已经成功发送,<a href="#" onclick="javascript:window.close()">关闭此窗口</a>!</p>
<%else%>
<p>· 邮件发送失败,请与电脑部--网站组联系,<a href="#" onclick="javascript:window.close()">关闭此窗口</a>!
<%end if%>
colinyin 2005-11-17
  • 打赏
  • 举报
回复
我测试成功了
starytx 2005-11-11
  • 打赏
  • 举报
回复
强顶!不久前也弄这个,结果没人帮我测试,我那个缺少下边这两项,估计发不了
JMail.MailServerUserName
JMail.MailServerPassword
pilicat 2005-11-11
  • 打赏
  • 举报
回复
是不是发送邮件的服务器需要身份难证呢?

---------------------------------------------------
http://kmok.cn

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧