ASP通过JMail组件读取邮件列表
|
admin
2010年7月3日 10:52
本文热度 6259
|
??
?
?????
????? 序号 |
????? 日期 |
????? 邮件标题 |
????? 发件人 |
????? 附件 |
????? 内容 |
???
<%
if request.form("submit")<>"" then
pop3server=request.form("pop3server")
uid=request.form("uid")
upwd=request.form("upwd")
riqi=cdate(request.form("riqi"))
set pop3 = server.createobject( "jmail.pop3" )
pop3.connect uid, upwd, pop3server??
'response.write( "你有" & pop3.count & " 封邮件。
" )
'set msg=server.createobject("jmail.message")
function getattachments() '获得附件
?if attachments.count>0 then
?? set attachments = msg.attachments
??getattachments = attachments(0).name & "(" & attachments(0).size & " bytes)"
?else
?getattachments=""
?end if
? end function??
for i=1 to pop3.count
?set msg = pop3.messages.item(i)
?set attachments = msg.attachments
?if cdate(msg.date)>=riqi then%>
???
????? <%= i %> |
????? <%= msg.date %> |
????? <%= msg.subject %> |
????? <%= msg.fromname %> |
????? <%= getattachments %> |
????? <%'=left(msg.body,50) %> |
???
? <%end if
? next
? pop3.disconnect
end if%>
?
?
该文章在 2010/7/3 10:52:42 编辑过