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

Source: Internet
Author: User
Object| the file that is invoked when the source code deletes a message (mail_prc.asp)
<%@ Language=vbscript%>
<%
'*************************************

' This file is called when you delete the message
' Author: Awayeah
' E-mail: awayeah@163.net

'*************************************

Dim cc,cc1,sep,dd
' Get the total number of messages
Msgcount = Session ("Msgcount")
Sep= ","

For I=1 to Msgcount
Dd= "C" +cstr (i)
MSGID=CSTR (Request.Form (DD))
If msgid= "" Then
Cc1=cc1+msgid
Else
Cc1=cc1+msgid+sep
End If
Next

If Len (cc1) =0 Then
Response.Redirect "Maillist1.asp"
End If
Cc1=left (Cc1,len (CC1)-1)
Dim arr
Arr=split (CC1, ",")
Set POP3 = CreateObject ("easymail.pop3.5")
Pop3.account=session ("Straccount")
Pop3.password=session ("Strpassword")
POP3. MailServer = "192.9.200.89"
POP3. LicenseKey = "awa/s19i500r1ax30c0r3100"

x = POP3. Connect ()
For i=0 to UBound (arr)
Arr (i) =clng (arr (i))
y = POP3. Downloadheaders

' Delete message

x = POP3. Deletesinglemessage (arr (i))

If x <> 0 Then
' Response.Write ' <p align=center><br><br> Error deleting message ("+ CSTR (x) +"). Contact your administrator .<br><br> "
' Response.Write ' <a href= ' maillist1.asp ' > Return </a></p> '
POP3. Disconnect
Response.End
Else
' Response.Write ' message deleted successfully.
' Response.Write ' "
' POP3. Disconnect
End If
Next
POP3. Disconnect
Response.Redirect "Maillist1.asp"
%>
<HTML>
<HEAD>
<meta name= "generator" content= "Microsoft Visual Studio 6.0" >
</HEAD>
<BODY>
</body>




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.