注册 | 登录
收藏 | 帮助
热门文章
编辑推荐
相关文章  
用MailSpy拦截局域网内危险的病毒
破译E-mail账号的技巧
破解Email账号三种方法
WiMAX的安全机制解析
教你强力破解E-mail密码的三种方
Linux/Unix环境下的make和makefi
Emacs 快速入门
DNS (domain Name System) 系统的
带SMTP认证功能的qmail配置
qmail+vpopmail+sqwebmail的安装
您现在的位置: 顶尖设计 >> IT学院 >> 服务器 >> Mail服务器 >> 文章正文
为imail和Mdaemon设计Webmail---读取邮件信息(maillist1.asp)
作者:21eok  来源:岚山夜话  点击:  更新:2006-12-20
简介:
<%@ LANGUAGE="VBSCRIPT" %>
<%
'*********************************

'这是邮件列示窗口,列出所有邮件的发件人、主题、日期、大小等

'*********************************
%>

<script language=vbscript>
'把邮件内容显示窗口置为空窗口
parent.frmbottom.location.href="blank.htm"

sub cmdel_onClick()
frmail.submit
end sub
</script>

<html>
<head>
<title>收邮件</title>
</head>
<STYLE>
<!--
A{text-decoration:none}
-->
</STYLE>
<body bgcolor="#008080" text="#000000">
<%

strserver=session("strserver")
strAccount=session("straccount")
strPassword=session("strpassword")


Set POP3 = CreateObject("EasyMail.POP3.5")
POP3.LicenseKey = "awa/S19I500R1AX30C0R3100"
POP3.MailServer = strServer
POP3.Account = straccount
POP3.Password = strpassword
'设置邮件内容显示格式
pop3.PreferredBodyFormat=1
pop3.TimeOut=300
'连接
x = POP3.Connect
If x <> 0 Then
Response.Write "<p align=center>连接错误: " + CStr(x) + "<br><br>请和管理员联系"
POP3.Disconnect
Response.End
End If
'下载邮件信息
x = POP3.DownloadMessages(0)
If x <> 0 Then
Response.Write "下载错误: " + CStr(x) +"<br><br>请和管理员联系"
POP3.Disconnect
Response.End
End If%>
<p><br></p><form name="frmail" action="mail_prc.asp" method="POST">
<div align="center">
<table border="1" width="98%" cellspacing="0" cellpadding="0" bordercolor="#000080" bgcolor="#FFFFFF">
<tr><td colspan=6 align="center">


你有<font color="ff00ff"><%=POP3.Messages.Count%></font>封邮件。</td>
<%session("msgcount")=POP3.Messages.Count%>
</tr>
<tr>
<td align="center"> </td>
<td align="center">来自/回复</td>
<td align="center">主题</td>
<td align="center">日期</td>
<td align="center" width=40>大小</td>
<!--<td width="30"><font face="宋体" size="2">删除</font></td>-->
<td align="center">选</td>
</tr>
<%'循环显示所有邮件
for i=pop3.messages.count to 1 step -1
%>

<tr>
<td align="center"><%if POP3.Messages.item(i).attachments.count>0 then '如果这个邮件有附件则显示带附件的图标
Response.Write "<img src='icon/attach.gif' border=0>"
else
Response.Write "<img src='icon/mail.gif' border=0>"
end if
%></td>
<%
fw="回复:"+replace(POP3.messages.item(i).subject,space(1),"_")
%>
<td>
<%receiver=POP3.Messages.item(i).from
if POP3.Messages.item(i).fromaddr="" then%>
<a href="">
<%else
%>
<a href=# onClick=javascript:window.open('sendmail1.asp?addr=<%=pop3.messages.item(i).fromaddr%>&subject=<%=fw%>','sendnew','width=600,height=480,scrollbars=yes');>
<%end if%>
<%if trim(receiver)="" then
response.write "匿 名</a>"%>
<%else%>
<a href=# onClick=javascript:window.open('sendmail1.asp?addr=<%=pop3.messages.item(i).fromaddr%>&subject=<%=fw%>','sendnew','width=600,height=480,scrollbars=yes');>
<font face="宋体" size="2">
<%=POP3.Messages.item(i).From%></font>
<%end if%>
</td>
<td>
<%msgid=POP3.GetMessageID(i) '取得邮件ID%>
<a href="showbody1.asp?id=<%'=msgid%><%=i%>" target="frmbottom">
<font face="宋体" size="2">
<%'显示邮件主题
if trim(POP3.messages.item(i).Subject)="" then
response.write "无主题"
else
response.write POP3.messages.item(i).Subject
end if
%></font>
</a></td>

<td><font face="宋体" size="2"><%=POP3.messages.item(i).date%></font></td>

<td><font face="宋体" size="2"><%=POP3.messages.item(i).size%></font></td>

<td><input type="checkbox" name="c<%=i%>" value="<%=i%>"></td>
</tr>
<%next
POP3.Disconnect
' Set POP3 = Nothing
%>
</table>
</div>
<p align="center"><input type="button" name="cmdel" value="删除"></p>
</form>
</body>
</html>




  • 上一篇文章:
  • 下一篇文章:
  • 分享此文:该页面添加到 Mister Wong 添加到雅虎Yahoo!收藏 Add to:Del.icio.us Post to Furl Digg this 添加到Google书签 reddit spurl blogmarks 365Key 评论  收藏  分享  打印
     我来说两句
    姓名:       验证码:   
    主页: 
    评分: 1分 2分 3分 4分 5分
    本频道近期热评文章:
      关于我们 | 联系我们 | 站点地图 | 广告投放 | 友情链接 | 在线留言 | 版权申明
    版权所有 © 2004-2007 顶尖设计(bobd.cn)
    未经授权禁止转载,摘编,复制本站内容或建立镜像. 沪ICP备07504942号 
    网络110
    报警服务