Sample code for 30+ languages & platforms
C#

Transition from Imap.FetchBundle to Imap.FetchMsgSet

Provides instructions for replacing deprecated FetchBundle method calls with FetchMsgSet.

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 FetchBundle method is deprecated:

Chilkat.EmailBundle bundleObj = imap.FetchBundle(mset);
if (imap.LastMethodSuccess == false) {
    Debug.WriteLine(imap.LastErrorText);
    return;
}

// ...
// ...

// ------------------------------------------------------------------------
// Do the equivalent using FetchMsgSet.
// Your application creates a new, empty EmailBundle object which is passed 
// in the last argument and filled upon success.

bool headersOnly = false;

Chilkat.EmailBundle bundleOut = new Chilkat.EmailBundle();
success = imap.FetchMsgSet(headersOnly,mset,bundleOut);
if (success == false) {
    Debug.WriteLine(imap.LastErrorText);
    return;
}