Sample code for 30+ languages & platforms
Python 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 Python Downloads

Python
import chilkat2

success = False

imap = chilkat2.Imap()

# ...
# ...

mset = chilkat2.MessageSet()
success = imap.QueryMbx("FROM joe@example.com",True,mset)
# ...
# ...

# Replace the deprecated FetchBundleAsMime method using FetchSingleBd.

imap.AutoDownloadAttachments = True

bdMime = chilkat2.BinData()
bUid = mset.HasUids
numEmails = mset.Count
i = 0
while i < numEmails :
    success = imap.FetchSingleBd(mset.GetId(i),bUid,bdMime)
    # ...
    # ...

    i = i + 1