To use the Easymailobject component in ASP to process Exchange message source code---the file that is called when the message is deleted
Source: Internet
Author: User
<%@ 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.
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