麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > 編程 > ASP > 正文

用EasyMailObject組件處理Exchange郵件源代碼(1)

2024-05-04 11:10:18
字體:
供稿:網(wǎng)友
在ASP中用EasyMailObject組件處理Exchange郵件源代碼---讀取郵件主題和大小(maillist1.asp)


<%@ LANGUAGE="VBscript" %>
<%
'************************************************

'這個文件列出所有郵件,并把郵件內(nèi)容顯示窗口置為空白窗口
'作者:awayeah
'郵箱:[email protected]

'************************************************
%>
<script language=vbscript>
parent.frmbottom.location.href="blank.htm"
sub cmdel_onClick()
'刪除郵件
frmail.submit
end sub
</script>
<%
if session("straccount")="" or session("strpassword")="" then
Response.write("<html><title>錯誤,尚未登錄</title><body><p align=center><br><br>你尚未登錄,請先退出登錄!<br><br>")
Response.Write ("<a href='login.asp' target='_top'><img src='http://www.newasp.net/Article/asp/example/2005/logout.jpg' border=0></a></p></body></html>")
Response.End
end if
%>
<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=120

   x = POP3.Connect
   If x <> 0 Then
      Response.Write "<p align=center>連接錯誤: " + CStr(x) + "<br><br>請和管理員聯(lián)系"
      POP3.Disconnect
      Response.End
   End If

   x = POP3.DownloadMessages(0)
   If x <> 0 Then
      Response.Write "下載錯誤: " + CStr(x) +"<br><br>請和管理員聯(lián)系"
      POP3.Disconnect
      Response.End
   End If%>
<p><br></p>
<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
'得到郵件總數(shù)
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%></font>封郵件。</td>
<%session("msgcount")=POP3.Messages.Count%>
</tr>
<tr>
<td align="center" width="20">號</td>
<td align="center" width="120">來自/回復</td>
<td align="center" width="270">主題</td>
<td align="center" width="90">日期</td>
<td align="center" width="60">大小</td>
<td align="center" width="20">選擇</td>
</tr>
    <%for i= sd to ed%>

<tr>
<td align="center" width="20"><%=i%></td>
<%
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 "匿 名</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 width="270">

<%msgid=POP3.GetMessageID(i)%>
<a href="showbody1.asp?id=<%=msgid%>" 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 width="90"><font face="宋體" size="2"><%=cdate(mid(cstr(POP3.messages.item(i).date),6,11))%></font></td>

<td  width="60"><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

%>
</table>
</center>
<p align="center"><input type="button" name="cmdel" value="刪除"></p>
</form>
<div align="center">
<table border="1" cellspacing="0" cellpadding="0" bordercolor="#ff0080" bgcolor="#FFFFFF">
<tr><td>頁數(shù)</td>
<%for i=1 to pagenum%>
<td><a href="maillist1.asp?currentpage=<%=i%>" target=frmtop> <%=i%> </a></td>
<%next%>
</tr></table></div>

</body>
</html>

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 久久精品网站视频 | 国产成人高清在线 | 一级毛片在线视频 | 免费国产一区 | 一区在线视频观看 | 欧美无极品 | 精国产品一区二区三区 | 91豆奶 | 91网在线播放 | 91成人在线免费视频 | 欧美日韩在线视频一区二区 | 中文字幕在线网站 | 一二区电影 | 一级网站| 国产一区二区三区视频在线 | 午夜激情视频免费 | 亚洲一区二区免费视频 | 九九热在线视频免费观看 | 日韩在线激情 | 天天操综 | 欧美精品一区二区久久久 | 国产一区二区亚洲 | av电影免费观看 | 国产91在线高潮白浆在线观看 | 黄网站在线免费 | 在线观看免费视频麻豆 | 久草手机视频在线观看 | 久久伊人精品视频 | 久草在线视频免费播放 | 欧美人人干 | 日本a∨精品中文字幕在线 狠狠干精品视频 | 人人做人人看 | 久草在线高清视频 | a级毛片免费观看在线播放 日本aaa一级片 | 欧美在线观看黄色 | 久久精品久久精品久久精品 | 欧美日韩电影在线 | 国产一区二区免费在线观看 | 国产精品亚洲一区二区三区在线观看 | av在线官网 | 一级成人毛片 |