Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
Ruby
SQL Server
VBScript
Read POP3 Email and Delete Bounced Emails
VBScript to read POP3 email and delete each email that is a bounce. set mailman = CreateObject("Chilkat.MailMan2")
mailman.UnlockComponent "30-day trial"
mailman.MailHost = "mail.chilkatsoft.com"
mailman.PopUsername = "mylogin"
mailman.PopPassword = "mypassword"
set bounce = CreateObject("ChilkatBounce.ChilkatBounce")
bounce.UnlockComponent "30-day trial"
' Read the email, but do not delete anything
set bundle = mailman.CopyMail()
numEmails = bundle.MessageCount
for i = 0 to numEmails-1
set email = bundle.GetEmail(i)
' Check to see if it is a bounced email.
bounce.ExamineMail(email)
' Bounce types documented at http://www.chilkatsoft.com/refdoc/xChilkatBounceRef.html
if (bounce.BounceType <> 0) then
' Display the bounced email' subject,
' and then delete the mail from the POP3 server.
MsgBox email.Subject
mailman.DeleteEmail email
end if
next
MsgBox "Finished!"
|
© 2000-2010 Chilkat Software, Inc. All Rights Reserved.