选择显示字体大小

用easymailobject组件处理exchange邮件源代码(1)


  在asp中用easymailobject组件处理exchange邮件源代码---读取邮件主题和大小(maillist1.asp)


<%@ language=&quot;vbscript&quot; %>
<%
'************************************************

'这个文件列出所有邮件,并把邮件内容显示窗口置为空白窗口
'作者:awayeah
'邮箱:awayeah@163.net

'************************************************
%>
<script language=vbscript>
parent.frmbottom.location.href=&quot;blank.htm&quot;
sub cmdel_onclick()
'删除邮件
frmail.submit
end sub
</script>
<%
if session(&quot;straccount&quot;)=&quot;&quot; or session(&quot;strpassword&quot;)=&quot;&quot; then
response.write(&quot;<html><title>错误,尚未登录</title><body><p align=center><br><br>你尚未登录,请先退出登录!<br><br>&quot;)
response.write (&quot;<a href='login.asp' target='_top'><img src='logout.jpg' border=0></a></p></body></html>&quot;)
response.end
end if
%>
<html>
<head>
<title>收邮件</title>
</head>
<style>
<!--
a{text-decoration:none}
-->
</style>
<body bgcolor=&quot;#008080&quot; text=&quot;#000000&quot;>
<%
'定义邮件服务器地址
strserver=session(&quot;strserver&quot;)
'定义帐号
straccount=session(&quot;straccount&quot;)
'定义密码
strpassword=session(&quot;strpassword&quot;)
'设置组件的各种属性
  set pop3 = createobject(&quot;easymail.pop3.5&quot;)
   pop3.licensekey = &quot;awa/s19i500r1ax30c0r3100&quot;
   pop3.mailserver = strserver
   pop3.account = straccount
   pop3.password = strpassword
   pop3.preferredbodyformat=1
   pop3.timeout=120

   x = pop3.connect
   if x <> 0 then
      response.write &quot;<p align=center>连接错误: &quot; + cstr(x) + &quot;<br><br>请和管理员联系&quot;
      pop3.disconnect
      response.end
   end if

   x = pop3.downloadmessages(0)
   if x <> 0 then
      response.write &quot;下载错误: &quot; + cstr(x) +&quot;<br><br>请和管理员联系&quot;
      pop3.disconnect
      response.end
   end if%>
<p><br></p>
<form name=&quot;frmail&quot; action=&quot;mail_prc.asp&quot; method=&quot;post&quot;>
<center>
<table border=&quot;1&quot; width=&quot;580&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; bordercolor=&quot;#000080&quot; bgcolor=&quot;#ffffff&quot;>
<tr><td colspan=6 align=&quot;center&quot;>
<%
'分页处理
if request.querystring(&quot;currentpage&quot;)=&quot;&quot; then
cp=1
else
cp=request.querystring(&quot;currentpage&quot;)
end if
'得到邮件总数
m_count=pop3.messages.count
if m_count<=10 then
pagenum=1
sd=1
ed=m_count
else
pagenum=int(m_count/10)+1
if clng(cp)<>pagenum then
lastpage=m_count mod 10
sd=(clng(cp)-1)*10+1
ed=clng(cp)*10
else
sd=(clng(cp)-1)*10+1
ed=m_count
end if
end if
%>
你有<font color=&quot;ff00ff&quot;><%=pop3.messages.count%></font>封邮件。</td>
<%session(&quot;msgcount&quot;)=pop3.messages.count%>
</tr>
<tr>
<td align=&quot;center&quot; width=&quot;20&quot;>号</td>
<td align=&quot;center&quot; width=&quot;120&quot;>来自/回复</td>
<td align=&quot;center&quot; width=&quot;270&quot;>主题</td>
<td align=&quot;center&quot; width=&quot;90&quot;>日期</td>
<td align=&quot;center&quot; width=&quot;60&quot;>大小</td>
<td align=&quot;center&quot; width=&quot;20&quot;>选择</td>
</tr>
    <%for i= sd to ed%>

<tr>
<td align=&quot;center&quot; width=&quot;20&quot;><%=i%></td>
<%
fw=&quot;回复:&quot;+replace(pop3.messages.item(i).subject,space(1),&quot;_&quot;)
%>
<td width=&quot;100&quot;>
<%receiver=pop3.messages.item(i).from%>
<%if pop3.messages.item(i).fromaddr=&quot;&quot; then%>
<a href=&quot;&quot;>
<%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)=&quot;&quot; then
response.write &quot;匿 名</a>&quot;%>
<%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=&quot;宋体&quot; size=&quot;2&quot;>
<%=pop3.messages.item(i).from%></font>
<%end if%>
</td>
<td width=&quot;270&quot;>

<%msgid=pop3.getmessageid(i)%>
<a href=&quot;showbody1.asp?id=<%=msgid%>&quot; target=&quot;frmbottom&quot;>
<font face=&quot;宋体&quot; size=&quot;2&quot;>
<%
if trim(pop3.messages.item(i).subject)=&quot;&quot; then
response.write &quot;无主题&quot;
else
response.write pop3.messages.item(i).subject
end if
%></font>
</a></td>
<td width=&quot;90&quot;><font face=&quot;宋体&quot; size=&quot;2&quot;><%=cdate(mid(cstr(pop3.messages.item(i).date),6,11))%></font></td>

<td  width=&quot;60&quot;><font face=&quot;宋体&quot; size=&quot;2&quot;><%=pop3.messages.item(i).size%></font></td>
<td><input type=&quot;checkbox&quot; name=&quot;c<%=i%>&quot; value=&quot;<%=i%>&quot;></td>
</tr>
<%next
   pop3.disconnect

%>
</table>
</center>
<p align=&quot;center&quot;><input type=&quot;button&quot; name=&quot;cmdel&quot; value=&quot;删除&quot;></p>
</form>
<div align=&quot;center&quot;>
<table border=&quot;1&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; bordercolor=&quot;#ff0080&quot; bgcolor=&quot;#ffffff&quot;>
<tr><td>页数</td>
<%for i=1 to pagenum%>
<td><a href=&quot;maillist1.asp?currentpage=<%=i%>&quot; target=frmtop> <%=i%> </a></td>
<%next%>
</tr></table></div>

</body>
</html>


 


关键字 本文所属关键字

相关 与本文相关文章

分类 所有文章关键字导航

源码编程相关

Java   Asp   PHP   .Net   XML   C/C++   CGI   VB   Jsp   J2ee   J2se   J2me   EJB   Servlet   Tomcat   Resin   Struts   Weblogic   Eclipse   ANT   GUI   JMS   Web servise   IDEA   Webphere   Hibernate   Spring   Jboss   Applet   Swing   Socket   Javamail   Perl   Ajax   P2P   安全   模式   框架   测试   开源   游戏

SQL数据库相关

My-SQL   Ms-SQL   Access   DB2   Oracle   Sybase   SQLserver   索引   存储过程   加密   数据库   分页   视图  

手机无线相关

3G   Wap   CDMA   GRPS   GSM   IVR   彩信   短信   无线   增值业务

网页设计制作相关

HTML   CSS   网页配色   网页特效   Javascript   VBscript   Dreamweaver   Frontpage   JS   Web   网站设计

网站建设推广相关

建站经验   网站优化   网站排名   推广   Alexa

操作系统/服务器相关

Windows XP   Windows 2000   Windows 2003   Windows Me   Windows 9.x   Linux   UNIX   注册表   操作系统   服务器   应用服务器

图形图像多媒体相关

Photoshop   Fireworks   Flash   Coreldraw   Illustrator   Freehand   Photoimpact   多媒体   图形图像

标准 网站致力的规范

Valid CSS!

无不良内容,无不良广告,无恶意代码

Valid XHTML 1.0 Transitional

creativecommons