Processing Exchange Message source code using the Easymailobject component in ASP (1)

Source: Internet
Author: User
Tags count
Object| source code read message subject and size (maillist1.asp)
<%@ language= "VBSCRIPT"%>
<%
'************************************************

' This file lists all the messages and puts the message Content display window as a blank window
' Author: Awayeah
' E-mail: awayeah@163.net

'************************************************
%>
<script language=vbscript>
parent.frmbottom.location.href= "Blank.htm"
Sub Cmdel_onclick ()
' Delete message
Frmail.submit
End Sub
</script>
<%
If session ("straccount") = "" or Session ("strpassword") = "" Then
Response.Write ("Response.Write ("<a href= ' login.asp ' target= ' _top '" ></a></p></body>Response.End
End If
%>
<title> Receive email </title>
<STYLE>
<!--
A{text-decoration:none}
-->
</STYLE>
<body bgcolor= "#008080" text= "#000000" >
<%
' Define mail server address
Strserver=session ("Strserver")
' Define account number
Straccount=session ("Straccount")
' Define Password
Strpassword=session ("Strpassword")
' Set the various properties of the component
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> Connection Error:" + CStr (x) + <br><br> please contact administrator
POP3. Disconnect
Response.End
End If

x = POP3. Downloadmessages (0)
If x <> 0 Then
Response.Write "Download Error:" + CStr (x) + <br><br> please contact administrator
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" >
&LT;TR&GT;&LT;TD colspan=6 align= "center" >
<%
' Page-handling
If Request.QueryString ("currentpage") = "" Then
Cp=1
Else
Cp=request.querystring ("CurrentPage")
End If
' Get total mail
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
%>
You have <font color= "ff00ff" &GT;&LT;%=POP3. Messages.count%></font> an e-mail message. </td>
<%session ("Msgcount") =pop3. Messages.count%>
</tr>
<tr>
&LT;TD align= "center" width= ">" </td>
&LT;TD align= "center" width= ">" From/Reply </td>
&LT;TD align= "center" width= "270" > Theme </td>
&LT;TD align= "center" width= "the" > Date </td>
&LT;TD align= "center" width= "> Size </td>
&LT;TD align= "center" width= "> Choice </td>
</tr>
<%for i= SD to Ed%>

<tr>
&LT;TD align= "center" width= "><%=i%></td>"
<%
fw= "Reply:" +replace (POP3.messages.item (i). Subject,space (1), "_")
%>
&LT;TD width= ">"
<%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 "Anonymous </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=&quo



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.