Sample code for 30+ languages & platforms
VBScript Requires Chilkat v11.0.0+

Transition from Imap.FetchBundleAsMime to Imap.FetchSingleBd

Provides instructions for replacing deprecated FetchBundleAsMime method calls with FetchSingleBd. The code below uses the replacement API without constructing the deprecated returned array.

Chilkat VBScript Downloads

VBScript
success = 0

set imap = CreateObject("Chilkat.Imap")

'  ...
'  ...

set mset = CreateObject("Chilkat.MessageSet")
success = imap.QueryMbx("FROM joe@example.com",1,mset)
'  ...
'  ...

'  Replace the deprecated FetchBundleAsMime method using FetchSingleBd.

imap.AutoDownloadAttachments = 1

set bdMime = CreateObject("Chilkat.BinData")
bUid = mset.HasUids
numEmails = mset.Count
i = 0
Do While i < numEmails
    success = imap.FetchSingleBd(mset.GetId(i),bUid,bdMime)
    '  ...
    '  ...

    i = i + 1
Loop