VBScript Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript


VBScript Examples

Bounced Mail
Character Encoding
Digital Certificates
Digital Signatures
Email
FTP
HTML-to-XML
HTTP
IMAP
Encryption
MHT / HTML Email
PFX
RSA Encryption
S/MIME
Socket
Spider
String
Tar
Upload
XML
XMP
Zip Compression
Self-Extractor

More Examples...
Email Object
POP3
SMTP
Byte Array
RSS
Atom
Service
PPMD
Deflate
DH Key Exchange
DSA
SSH Key
SSH
SSH Tunnel
SFTP

Unreleased...
Bzip2
LZW
Bz2
Icon

 

 

 

 

 

 

 

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.

Mail Component · XML Parser