Unicode C++
Unicode C++
Transition from Imap.FetchBundle to Imap.FetchMsgSet
Provides instructions for replacing deprecated FetchBundle method calls with FetchMsgSet.Chilkat Unicode C++ Downloads
#include <CkImapW.h>
#include <CkMessageSetW.h>
#include <CkEmailBundleW.h>
void ChilkatSample(void)
{
bool success = false;
CkImapW imap;
// ...
// ...
CkMessageSetW mset;
success = imap.QueryMbx(L"FROM joe@example.com",true,mset);
// ...
// ...
// ------------------------------------------------------------------------
// The FetchBundle method is deprecated:
CkEmailBundleW *bundleObj = imap.FetchBundle(mset);
if (imap.get_LastMethodSuccess() == false) {
wprintf(L"%s\n",imap.lastErrorText());
return;
}
// ...
// ...
delete bundleObj;
// ------------------------------------------------------------------------
// 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;
CkEmailBundleW bundleOut;
success = imap.FetchMsgSet(headersOnly,mset,bundleOut);
if (success == false) {
wprintf(L"%s\n",imap.lastErrorText());
return;
}
}