| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1381 人关注过本帖
标题:Jmail发不出邮件...
取消只看楼主 加入收藏
wrz8511
Rank: 1
等 级:新手上路
帖 子:14
专家分:0
注 册:2006-6-3
收藏
 问题点数:0 回复次数:3 
Jmail发不出邮件...

我用Jmail发邮件,老是发不出去...我是用学校的局域网,上外网要代理,会不会有影响??下面是我的代码:

<%
Set Jmail=Server.CreateObject("JMail.Message")
Jmail.silent= true
Jmail.logging=true
Jmail.Charset="GB2312"
Jmail.ContentType="text/html"
Jmail.MailServerUserName = "myemail@126.com"
Jmail.MailServerPassWord = "123456"
JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
Jmail.From = "myemail@126.com"
Jmail.FromName="WRZ"
Jmail.AddRecipient "yourmail@163.com"
Jmail.Subject = "subject"
Jmail.Body = "content"
Jmail.Priority = 1
If Jmail.Send("smtp.126.com") = false Then
Response.Write Jmail.log
Else
Response.Write("<script language='javascript'>window.alert('发送成功!');</script>")
End If
Jmail.Close
Set JMail = Nothing
%>

他显示错误为:
The message was undeliverable. All servers failed to receive the message .execute() { Trying server mail:smtp.126.com smtp.126.com failed with the message: "Connection reset by client." No socket for server. ConnectToServer() 1 of 1 servers failed }


我用以下的代码发,弹出发送成功,却收不到邮件!!!!
<%
Set jmail = Server.CreateObject("JMAIL.SMTPMail") jmail.silent = true
jmail.logging = true
jmail.Charset = "GB2312"
jmail.ContentType = "text/html"
jmail.ServerAddress = "127.0.0.1"
jmail.AddRecipient "youremail@163.com"
jmail.SenderName = "WRZ"
jmail.Sender = "myemail@126.com"
jmail.Priority = 1
jmail.Subject = "title "
jmail.Body = "content"
If jmail.Execute() = false Then
Response.Write Jmail.log
Else
Response.Write("<script language='javascript'>window.alert('发送成功!');</script>")
End If
jmail.Close
set jmail=nothing
%>

麻烦大家帮忙下啊!!!!!!!

搜索更多相关主题的帖子: Jmail 邮件 
2006-06-03 23:47
wrz8511
Rank: 1
等 级:新手上路
帖 子:14
专家分:0
注 册:2006-6-3
收藏
得分:0 

还是不行啊!!..

2006-06-04 00:41
wrz8511
Rank: 1
等 级:新手上路
帖 子:14
专家分:0
注 册:2006-6-3
收藏
得分:0 

我写出来的是假的
不可能把真的邮箱和密码都贴出来吧...请原谅
我用的邮箱的用户名和密码绝对正确的!!!

[此贴子已经被作者于2006-6-4 0:58:59编辑过]

2006-06-04 00:53
wrz8511
Rank: 1
等 级:新手上路
帖 子:14
专家分:0
注 册:2006-6-3
收藏
得分:0 
你用我的代码吗?
我用的jmail是4.4的。你的呢??

会不会和我是局域网有关系呢??
用下面的代码却发送成功!不过收不到邮件!!!!很郁闷啊!!!
<%
Set jmail = Server.CreateObject("JMAIL.SMTPMail")
jmail.silent = true
jmail.logging = true
jmail.Charset = "GB2312"
jmail.ContentType = "text/html"
jmail.ServerAddress = "127.0.0.1"
jmail.AddRecipient "youremail@163.com"
jmail.SenderName = "WRZ"
jmail.Sender = "myemail@126.com"
jmail.Priority = 1
jmail.Subject = "title "
jmail.Body = "content"
If jmail.Execute() = false Then
Response.Write Jmail.log
Else
Response.Write("<script language='javascript'>window.alert('发送成功!');</script>")
End If
jmail.Close
set jmail=nothing
%>

[此贴子已经被作者于2006-6-4 1:09:04编辑过]

2006-06-04 01:08
快速回复:Jmail发不出邮件...
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016740 second(s), 10 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved