Ruby Requires Chilkat v11.0.0+
Ruby
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 Ruby Downloads
require 'chilkat'
success = false
imap = Chilkat::CkImap.new()
# ...
# ...
mset = Chilkat::CkMessageSet.new()
success = imap.QueryMbx("FROM joe@example.com",true,mset)
# ...
# ...
# Replace the deprecated FetchBundleAsMime method using FetchSingleBd.
imap.put_AutoDownloadAttachments(true)
bdMime = Chilkat::CkBinData.new()
bUid = mset.get_HasUids()
numEmails = mset.get_Count()
i = 0
while i < numEmails
success = imap.FetchSingleBd(mset.GetId(i),bUid,bdMime)
# ...
# ...
i = i + 1
end