Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python 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("ChilkatMail2.ChilkatMailMan2")
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!"
|
Need a specific example? Send a request to support@chilkatsoft.com
© 2003-2008 Chilkat Software, Inc. All Rights Reserved.