bBounce Object Sample - Simple
Language: Vbscript



' ** Init
sFileToCheck = "c:\temp\bouncemessage.txt"

' ** Create BoogieBounce API Object
Set bBounceX = CreateObject("bBounceX.bBounce")

' ** Create FileSystemObject Object
Set oFS = CreateObject("Scripting.FileSystemObject")

' ** Read In Current File Using FileSystemObject Object
Set oFile = oFS.OpenTextFile(sFileToCheck, 1, True)
sText = oFile.ReadAll
Set oFile = Nothing

' ** Set some bBounceX properties
bBounceX.IgnoreAddresses = "joe@joe.com|joe_reply@joe.com"
bBounceX.LicenseKey = "My Key/123456"

' ** Set RawMessageBuffer in API to file contents.
bBounceX.RawMessageBuffer = sText

' ** Do Bounce Check
BounceType = bBounceX.DoBounceCheck()
EmailAddr = bBounceX.BouncedEmailAddress

' ** Display BounceType Return Code, and Email Address.
Msgbox BounceType & ":" & EmailAddr

' ** Destroy bBounceX Object
Set oFS = Nothing
Set bBounceX = Nothing