在ASP中用EasyMailObject组件处理Exchange邮件源代码(1)

2016-01-29 20:20 6 1 收藏

在ASP中用EasyMailObject组件处理Exchange邮件源代码(1),在ASP中用EasyMailObject组件处理Exchange邮件源代码(1)

【 tulaoshi.com - ASP 】

读取邮件主题和大小(maillist1.asp)
<%@ LANGUAGE="VBSCRIPT" %
<%
'************************************************

'这个文件列出所有邮件,并把邮件内容显示窗口置为空白窗口
'作者:awayeah
'邮箱:[email protected]

(本文来源于图老师网站,更多请访问https://www.tulaoshi.com/asp/)

'************************************************
%
<script language=vbscript
parent.frmbottom.location.href="blank.htm"
sub cmdel_onClick()
'删除邮件
frmail.submit
end sub
<%
if session("straccount")="" or session("strpassword")="" then

end if
%
<html
<head
<title收邮件<STYLE
<!--
A{text-decoration:none}
--
<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=120

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<form name="frmail" action="mail_prc.asp" method="POST"
<center
<table border="1" width="580" cellspacing="0" cellpadding="0" bordercolor="#000080" bgcolor="#FFFFFF"
<tr<td colspan=6 align="center"
<%
'分页处理
if Request.QueryString("currentpage")="" then
cp=1
else
cp=Request.QueryString("currentpage")
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="ff00ff"<%=POP3.Messages.Count%<%session("msgcount")=POP3.Messages.Count%
<tr
<td align="center" width="20"号<td align="center" width="120"来自/回复<td align="center" width="270"主题<td align="center" width="90"日期<td align="center" width="60"大小<td align="center" width="20"选择<%for i= sd to ed%

<tr
<td align="center" width="20"<%=i%<%
fw="回复:"+replace(POP3.messages.item(i).subject,space(1),"_")
%
<td width="100"
<%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 "匿 名<%else%
<a href=# onClick=javascript:window.open('sendmail1.asp?addr=<%=pop3.messages.item(i).fromaddr%&subject=<%=fw%','sendnew','width=600,h

(本文来源于图老师网站,更多请访问https://www.tulaoshi.com/asp/)

来源:https://www.tulaoshi.com/n/20160129/1511050.html

延伸阅读
标签: ASP
  在ASP中用EasyMailObject组件处理Exchange邮件源代码---读取邮件内容和附件(showbody1.asp) <%@ LANGUAGE="VBSCRIPT" % <% '************************************************ '这个文件显示邮件的内容和附件 '作者:awayeah '邮箱:awayeah@163.net '************************************************ % <htm...
标签: ASP
  在ASP中用EasyMailObject组件处理Exchange邮件源代码---发送邮件(p_sendmail.asp) <%@ Language=VBScript % <% '************************************* '这个文件用来发送邮件 '作者:awayeah '邮箱:awayeah@163.net '************************************* if session("straccount")="" or session(&...
标签: ASP
  在ASP中用EasyMailObject组件处理Exchange邮件源代码---保存附件(saveatt.asp) <%@ Language=VBScript % <% '************************************* '这个文件用来下载附件 '作者:awayeah '邮箱:awayeah@163.net '************************************* Dim fso, tempfile Set fso = CreateObject("Scripting.FileS...
标签: ASP
  在ASP中用EasyMailObject处理Exchange邮件源代码---补充说明 这些代码是针对Microsoft Exchange Server 5.5开发的,对服务器不一定可用,我在Imail 7.04上就用不了,可能是因为两个服务器对邮件的处理有点不同,譬如在Exchange上每个邮件都有一个唯一的ID,是不变的。但在Imail上就不一样了,它的邮件ID是可变的,譬如你有20封邮件,它...
标签: ASP
  从网上兴致冲冲地下载了ASP源代码,准备学习研究的时候.一打开文件,天书般的加密代码.很让人郁闷吧 :( 在网上是找到了解密的方法,得一个文件挨一个文件地打开,复制,粘贴,解密,再复制,再粘贴,再保存...... 如果一个ASP程序有几百个文件??? 解决办法来了.. decode.asp <% @Language="JavaScript" % <% /*  *-----------...

经验教程

129

收藏

77
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部