Jmail收邮件问题
Set pop3 = Server.CreateObject( "JMail.POP3" )
pop3.Connect "mile_24546603@163.com", "111111", "pop3.163.com"
Response.Write( "You have " & pop3.count & " mails in your mailbox!<br/><br/>" )
if pop3.count > 0 Then
Set msg = pop3.Messages.item(1)
ReTo = ""
ReCC = ""
Set Recipients = msg.Recipients
separator = ", "
For i = 0 To Recipients.Count - 1
If i = Recipients.Count - 1 Then
separator = ""
End If
Set re = Recipients.item(i)
If re.ReType = 0 Then
ReTo = ReTo & re.Name & " (<a href=""mailto:"& re.EMail &""">" & re.EMail & "</a>)" & separator
else
ReCC = ReTo & re.Name & " (<a href=""mailto:"& re.EMail &""">" & re.EMail & "</a>)" & separator
End If
Next
可是打开后却显示
Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
jmail.POP3 错误 '8000ffff'
This function is not included in this version of jmail.
/jm/simplePOP3.asp,行24
这是怎么回事啊?请大虾们帮帮忙啊!
我已经换了4.5的版本了,为什么还是出现原来的错误啊?
还有人说少了一个END IF,但是我不知道加在哪合适?
问题点数:100、回复次数:9Top
1 楼singit3()回复于 2006-03-04 19:12:59 得分 0
从代码上看,应该是少了个end if
但不知道这是不是症结所在,你把代码整理一下
if pop3.count > 0 Then
Set msg = pop3.Messages.item(1)
ReTo = ""
ReCC = ""
Set Recipients = msg.Recipients
separator = ", "
For i = 0 To Recipients.Count - 1
If i = Recipients.Count - 1 Then
separator = ""
End If
Set re = Recipients.item(i)
If re.ReType = 0 Then
ReTo = ReTo & re.Name & " (<a href=""mailto:"& re.EMail &""">" & re.EMail & "</a>)" & separator
else
ReCC = ReTo & re.Name & " (<a href=""mailto:"& re.EMail &""">" & re.EMail & "</a>)" & separator
End If
Next
这明显少end if与
if pop3.count > 0 Then 对应!
建议以后将代码编排的整齐一下,上下对照,这样容易找出问题。Top
2 楼mick24546603(mick)回复于 2006-03-04 20:31:06 得分 0
我改成这样了:
Set mailre=Server.CreateObject("JMail.POP3")'pop3的连接用户名,密码,pop3地址
mailre.Connect "mile_24546603","111111","pop3.163.com"
Response.Write( "你有" & mailre.count & " 封邮件。<br/><br/>" )
set msg1=server.CreateObject("jmail.message")
If mailre.count > 0 Then
Set msg1 = mailre.Messages.item(1)
ReTo = ""
ReCC = ""
Set Recipients = msg1.Recipients
separator = ", "
For i = 0 To Recipients.Count - 1
If i = Recipients.Count- 1 Then
separator = ""
End If
Set re = Recipients.item(i)
If re.ReType = 0 Then
ReTo= ReTo&re.Name &"(<a href=""mailto:"&re.EMail&""">"&re.EMail &"</a>)" &separator
Else
ReCC= ReTo&re.Name &"(<a href=""mailto:"&re.EMail&""">"&re.EMail &"</a>)" &separator
End If
Next
End If
还是原来的错误:
Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
jmail.POP3 错误 '8000ffff'
This function is not included in this version of jmail.
/jm/gryj/shoujianxiang.asp,行22
我的22行是:mailre.Connect "mile_24546603","111111","pop3.163.com"Top
3 楼boyd1985(波伊德乐园->http://www.boyd.cn)回复于 2006-03-04 22:50:27 得分 0
你原来的代码里少了一个end if,就是你刚发帖时那个样的Top
4 楼mick24546603(mick)回复于 2006-03-05 01:01:27 得分 0
问题是我加了END IF还是出现一样的错啊Top
5 楼mick24546603(mick)回复于 2006-03-05 18:21:04 得分 0
难道在CSDN就没人知道吗?Top
6 楼singit3()回复于 2006-03-06 10:30:07 得分 0
你的代码是没有错的。
我把你改过的代码提制到我的电脑上运行成功,当然是修改了用户名和密码的
运行成功是这样的“你有14 封邮件。”
可能是你IIS有问题吧,建议你重新下载安装一下jmail4.2试一下。
下载地址:
http://down.tfol.com/down/soft/pc/net/email/web/ihtml/2001-08-03/20010803,094102,3787.shtmlTop
7 楼mick24546603(mick)回复于 2006-03-07 01:21:16 得分 0
我去试试
Top
8 楼yaokeguo(克哥)回复于 2006-04-03 17:51:47 得分 0
jmail收邮件时是以从1天始的,不用减1,附件才从for 0 to count - 1Top
9 楼taolixiang(飞扬 怎么还不升级!!...... 哦 ...... 原来是要答对题才能升!)回复于 2006-04-03 19:45:52 得分 0
关注
找版主呀
Top




