<%
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
%>
第一次做这个东西,发邮件一直显示的是发送失败,组件装了,也不知道哪里错了,博友们可以给我指出下错误,也可以教我怎么去排错,谢了,急, 在线等
检查一下发email的pop开通了没
1,用这个测试邮箱在你本地测试下是否能顺利发送邮件。
2,代码中可以加入ty catch块来打印出错信息
在网上找一段asp用jamil发邮件的代码,应该很多。现在不用asp了,懒的找了。