首页新闻找找看学习计划

asp发邮件问题

0
悬赏园豆:10 [待解决问题]


<%
dim jmail
act=request.querystring("action")
if act="jmail" then
mailserver="smtp.chinatefl.com"
receive=request("18857876029@126.com")
mailFROM="administrator@chinatefl.com"
username="administrator@chinatefl.com"
password="chinatefl001"

subject="from helen"
body=all
call SendMail (subject, body, mailserver, receive, mailFROM, username,password)


Sub SendMail(subject, body, mailserver, receive, mailFROM, username,password)
Set jmail = Server.CreateObject("JMAIL.Message")
jmail.silent = true
jmail.logging = true
jmail.Charset = "gb2312"
jmail.ContentType = "text/html"
jmail.AddRecipient receive
jmail.From = mailFROM
jmail.MailServerUserName = username
jmail.MailServerPassword = password
jmail.Subject = subject
jmail.Priority = 1

jmail.Body = body

flag=jmail.Send(mailserver)

if flag=true then
response.Redirect("thanks.html")
else
response.write"发送失败"
end if
jmail.Close
set jmail=nothing
end sub

end if

%>

 

 

第一次做这个东西,发邮件一直显示的是发送失败,组件装了,也不知道哪里错了,博友们可以给我指出下错误,也可以教我怎么去排错,谢了,急, 在线等

asp
元浩的主页 元浩 | 初学一级 | 园豆:109
提问于:2012-12-20 15:26
< >
分享
所有回答(3)
0

检查一下发email的pop开通了没

jason2013 | 园豆:1998 (小虾三级) | 2012-12-21 08:21
0

1,用这个测试邮箱在你本地测试下是否能顺利发送邮件。

2,代码中可以加入ty catch块来打印出错信息

茂茂 | 园豆:2860 (老鸟四级) | 2012-12-21 10:02
0

在网上找一段asp用jamil发邮件的代码,应该很多。现在不用asp了,懒的找了。

静以修身俭以养德 | 园豆:216 (菜鸟二级) | 2012-12-21 23:33
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册