关于W3 JMAIL的POP3收信问题

degang_wang 2001-12-31 04:21:27
有谁处理过用W3 JMAIL的POP3收信,如果我的用户名或密码输出该如何做异常处理?
...全文
72 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
degang_wang 2001-12-31
  • 打赏
  • 举报
回复
我用的是个人版的查过他的帮助文档没有啊?能否替我查查 谢谢!
mkiss 2001-12-31
  • 打赏
  • 举报
回复
这个组件有这样的属性
degang_wang 2001-12-31
  • 打赏
  • 举报
回复
我问的是如何做异常处理,我也用过以上的代码,但当你输出密码或用户名时,他出现的出错的页面。并没有提示什么错误。
mkiss 2001-12-31
  • 打赏
  • 举报
回复
jmail4.1用pop3收信的例子

【caoli】 于 2000-12-22 17:24:14 加贴在 Joy ASP ↑:

<% Set pop3 = Server.CreateObject( "JMail.POP3" )

'pop3的连接用户名,密码,pop3地址
pop3.Connect "username", "password", "mail.mydomain.com"

Response.Write( "你有" & pop3.count & " 封邮件。<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

'这个程序得到附件,并且保存到服务器的硬盘上。也可以返回附件的详细连接
Function getAttachments()
Set Attachments = msg.Attachments
separator = ", "

For i = 0 To Attachments.Count - 1
If i = Attachments.Count - 1 Then
separator = ""
End If

Set at = Attachments(i)
at.SaveToFile( "c:\EMail\attachments\" & at.Filename )
getAttachments = getAttachments & "<a href=""/EMail/attachments/" & at.Filename &""">" &_
at.FileName & "(" & at.Size & " bytes)" & "</a>" & separator
Next
End Function

%>
<html>
<body>
<TABLE>
<tr>
<td>邮件标题</td>
<td><%= msg.Subject %></td>
</tr>
<tr>
<td>发件人</td>
<td><%= msg.FromName %></td>
</tr>
<tr>
<td>收件人</td>
<td><%= ReTO %></td>
</tr>
<tr>
<td>抄送</td>
<td><%= ReCC %></td>
</tr>
<tr>
<td>附件</td>
<td><%= getAttachments %></td>
</tr>
<tr>
<td>内容</td>
<td><pre><%= msg.Body %></pre></td>
</tr>
</TABLE>
</body>
</html>

<% end if

pop3.Disconnect

%>

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧