|
主题: 帮我看一下这个JMAIL哪里有问题
|
 沉默是金
职务:普通成员
等级:6
金币:11.2
发贴:4357
注册:2004/2/18 11:17:25
|
#12003/6/20 13:23:36
Set JMail=Server.CreateObject("JMail.Message") JMail.Charset="gb2312" JMail.ContentType ="text/plain" JMail.silent = true JMail.Logging=False JMail.Priority=3 JMail.MailServerUserName="whlf@***.com" JMail.MailServerPassword ="*****" JMail.from="arhui78@hotmail.com" JMail.fromname="abcdefg" JMail.AddRecipient ("arhui78@163.com") JMail.subject="干你" JMail.body=“为什么发送不了呀!” JMail.send "211.152.33.**" response.write ("发送成功了!") set JMail=nothing
页面显示是发送成功了,但是邮箱里就没有。何故?? 我装了JMAIL的。
难人一个……
|
 janlay
职务:管理员
等级:7
金币:28.0
发贴:7244
注册:2003/11/27 18:07:11
|
#22003/6/20 13:48:36
你没有真正检查是否成功发送了邮件,而是一厢情愿地认为已经成功发送了。 在创建jmail.smtp对象实例后加一句: JMail.Logging = True 然在发送时: If JMail.send("211.152.33.**") Then
response.write ("发送成功了!")
Else
Response.Write "发送失败,错误信息: "& JMail.Log
End If 如果没有发送成功,显示log记录,方便排错
编辑历史:[这消息被janlay编辑过(编辑时间2003-06-20 13:49:42)]
|
 沉默是金
职务:普通成员
等级:6
金币:11.2
发贴:4357
注册:2004/2/18 11:17:25
|
#32003/6/20 14:03:04
按照涂料兄的作法,显示以下东东,哪位看得懂,帮翻译一下: 发送失败,错误信息: The message was undeliverable. All servers failed to receive the message ClientLogging enabled: Client Remote Address: 192.168.2.2 .execute() { Trying server mail:211.152.33.88 <- 220 ESMTP SkyMiracle WorldPost KM 8.0 -> EHLO wang <- 250-mail88.cn4e.com 250-PIPELINING 250-SIZE 10240000 250-ETRN 250-AUTH LOGIN PLAIN 250 8BITMIME -> AUTH LOGIN Sending authentication data.. -> MAIL FROM: <- 250 Ok -> RCPT TO:arhui78@hotmail.com <- 553 Sender's email arhui78@163.com is wrong -> DATA <- 503 Error: need RCPT command Error: 503 Error: need RCPT command ClientLogging enabled: Client Remote Address: 192.168.2.2 .execute() { Trying server mail:211.152.33.88 <- 220 ESMTP SkyMiracle WorldPost KM 8.0 -> EHLO wang <- 250-mail88.cn4e.com 250-PIPELINING 250-SIZE 10240000 250-ETRN 250-AUTH LOGIN PLAIN 250 8BITMIME -> AUTH LOGIN Sending authentication data.. -> MAIL FROM: <- 250 Ok -> RCPT TO:arhui78@hotmail.com <- 553 Sender's email arhui78@163.com is wrong -> DATA <- 503 Error: need RCPT command Error: 503 Error: need RCPT command 1 of 1 servers failed }
难人一个……
|
 fredmeng
职务:普通成员
等级:1
金币:0.0
发贴:13
注册:2003/6/20 1:08:12
|
#42003/6/20 18:12:07
我的情况和arhui老兄也差不多: http://www.5d.cn/bbs/NewsDetail.asp?id=827969 引用: 希望高手指教指教 我的服务器支持Jmail和CDNOTS 我用ASP使用Jmail发信不行。填入了有效的stmp地址。 后来只有试一试CDNOTS(CDNOTS是不是不需要stmp服务器地址?) 测试通过。我Yahoo的信箱马上就能收到。 今天,又不行啦,我试了试两种方式都不行啦,程序根本就没有改变。 有没有朋友有这方面的经验?请指教小弟一下。 谢谢
我用Janlay的方法试了试,我的没有像arhui那样显示那么多代码。我的显示是 成功发信! 但是,信箱就是没收到。真是着急。
|
 fredmeng
职务:普通成员
等级:1
金币:0.0
发贴:13
注册:2003/6/20 1:08:12
|
#52003/6/20 18:21:34
这是我对照Janlay的方法更改后的代码 通过其他程序调用 <% sub Jmail(email,topic,mailbody) on error resume next dim JMail Set JMail=Server.CreateObject("JMail.SMTPMail") JMail.Logging=True JMail.Charset="iso-8859-1" JMail.ContentType = "text/html" JMail.ServerAddress=smtp.web.de JMail.Sender=myname@domain.com JMail.Subject=Hallo JMail.Body=TEST JMail.AddRecipient email JMail.Priority=1 'JMail.Execute If JMail.Execute Then response.write ("发送成功") SendMail="OK" Else Response.Write "出错 "& JMail.Log End If Set JMail=nothing 'if err then 'SendMail=err.description 'err.clear 'else 'SendMail="OK" 'end if end sub %>
编辑历史:[这消息被fredmeng编辑过(编辑时间2003-06-20 18:23:59)] [这消息被fredmeng编辑过(编辑时间2003-06-20 18:25:13)]
|
 fredmeng
职务:普通成员
等级:1
金币:0.0
发贴:13
注册:2003/6/20 1:08:12
|
#62003/6/20 20:11:23
刚才又试了试
我必须把
JMail.ServerAddress=smtp.web.de
屏蔽了 就能发送了 我Yahoo的信箱马上就能收到。太奇怪了连smtp服务器地址都没给程序怎么发出去的呀? 有没有也遇到过这种情况。 Yahoo收到的信是写的
X-Apparently-To: fredmengde@yahoo.de via 216.136.173.231; 20 Jun 2003 04:42:01 -0700 (PDT) Return-Path: Received: from 我的IP(EHLO 我的机器名) (我的IP) by mta202.mail.scd.yahoo.com with SMTP; 20 Jun 2003 04:42:00 -0700 (PDT) X-Priority: 1 X-MSMail-Priority: High Content-Transfer-Encoding: Quoted-Printable MIME-Version: 1.0 X-Mailer: JMail 4.3.1 by Dimac Content-Type: text/html Content-Length: 4
|
 janlay
职务:管理员
等级:7
金币:28.0
发贴:7244
注册:2003/11/27 18:07:11
|
#72003/6/20 22:55:33
JMail中如果没有指定smtp服务器位置,它会用本机作为smtp发送,你的机器是不是已经装了SMTP模块了
|
 fredmeng
职务:普通成员
等级:1
金币:0.0
发贴:13
注册:2003/6/20 1:08:12
|
#82003/6/21 15:36:33
原来是这样 我试了试 现在可以发了 我装了IIS的SMTP 如果我指定用我本机的smtp发信 会出现目的email地址不能相应 帮看看吧 谢谢 你可以看看 引用: fred是我的机器名 139.18是我的IP The message was undeliverable. All servers failed to receive the message .execute() { Trying server mail:139.18.*.* <- 220 fred Microsoft ESMTP MAIL Service, Version: 5.0.2195.5329 ready at Sat, 21 Jun 2003 09:30:50 +0200 -> EHLO fred <- 250-fred Hello [139.18.*.*] 250-SIZE 2097152 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY 250 OK -> MAIL FROM: <- 250 2.1.0 fredmengde@web.de....Sender OK -> RCPT TO:fredmengde@yahoo.de <- 550 5.7.1 Unable to relay for fredmengde@yahoo.de -> DATA <- 554 5.5.2 No valid recipients Error: 554 5.5.2 No valid recipients .execute() { Trying server mail:139.18.*.* <- 220 fred Microsoft ESMTP MAIL Service, Version: 5.0.2195.5329 ready at Sat, 21 Jun 2003 09:30:50 +0200 -> EHLO fred <- 250-fred Hello [139.18.*.*] 250-SIZE 2097152 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY 250 OK -> MAIL FROM: <- 250 2.1.0 fredmengde@web.de....Sender OK -> RCPT TO:fredmengde@yahoo.de <- 550 5.7.1 Unable to relay for fredmengde@yahoo.de -> DATA <- 554 5.5.2 No valid recipients Error: 554 5.5.2 No valid recipients 1 of 1 servers failed }
编辑历史:[这消息被fredmeng编辑过(编辑时间2003-06-21 15:37:32)]
|