Jmail收邮件时发生错误,帮忙!
错误类型:
jmail.POP3 (0x8000FFFF)
WSAGetLastError() returned 10061, Connection refused
/test/GetMail.asp, 第 10 行
代码:
<%
set pop3=server.CreateObject("Jmail.POP3")
pop3.Connect "XXXXXXX","XXXXXXX","smtp.21cn.com" '// 这行是第10行
response.Write("You have <font color=red>"&pop3.count&"</font>E-mails in your mailbox!<br><br>")
response.End()
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=recipient.item(i)
if re.ReType=0 then
Reto=Reto&re.name&" "&re.EMail&""">"& re.EMail&separator
else
Recc=Recc&re.name&" "&re.EMail&""">"& re.EMail&separator
end if
next
end if
%>
主 题:<%=msg.Subject%><br>
发件人:<%=msg.FromName%><br>
收件人:<%=Reto%><br>
抄 送:<%=Recc%><br>
正 文:<br>
<pre><%=msg.body%></pre>
<%pop3.Disconnect%>