Go Requires Chilkat v11.0.0+
Go
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 Go Downloads
success := false
imap := chilkat.NewImap()
// ...
// ...
mset := chilkat.NewMessageSet()
success = imap.QueryMbx("FROM joe@example.com",true,mset)
// ...
// ...
// Replace the deprecated FetchBundleAsMime method using FetchSingleBd.
imap.SetAutoDownloadAttachments(true)
bdMime := chilkat.NewBinData()
bUid := mset.HasUids()
numEmails := mset.Count()
i := 0
for i < numEmails {
success = imap.FetchSingleBd(*mset.GetId(i),bUid,bdMime)
// ...
// ...
i = i + 1
}
imap.DisposeImap()
mset.DisposeMessageSet()
bdMime.DisposeBinData()