Sample code for 30+ languages & platforms
C#

Transition from Imap.FetchBundleAsMime to Imap.FetchSingleBd

Provides instructions for replacing deprecated FetchBundleAsMime method calls with FetchSingleBd.

Chilkat C# Downloads

C#
bool success = false;

Chilkat.Imap imap = new Chilkat.Imap();

// ...
// ...

Chilkat.MessageSet mset = new Chilkat.MessageSet();
success = imap.QueryMbx("FROM joe@example.com",true,mset);
// ...
// ...

// ------------------------------------------------------------------------
// The FetchBundleAsMime method is deprecated:

Chilkat.StringArray saObj = imap.FetchBundleAsMime(mset);
if (imap.LastMethodSuccess == false) {
    Debug.WriteLine(imap.LastErrorText);
    return;
}

// ...
// ...

// ------------------------------------------------------------------------
// Do the equivalent using FetchSingleBd.

imap.AutoDownloadAttachments = true;

Chilkat.BinData bdMime = new Chilkat.BinData();
bool bUid = mset.HasUids;
int numEmails = mset.Count;
int i = 0;
while (i < numEmails) {
    success = imap.FetchSingleBd(mset.GetId(i),bUid,bdMime);
    // ...
    // ...

    i = i + 1;
}