Sample code for 30+ languages & platforms
Unicode C++

Transition from MailMan.LoadXmlFile to EmailBundle.LoadXml

Provides instructions for replacing deprecated LoadXmlFile method calls with EmailBundle.LoadXml.

Chilkat Unicode C++ Downloads

Unicode C++
#include <CkMailManW.h>
#include <CkEmailBundleW.h>

void ChilkatSample(void)
    {
    bool success = false;

    CkMailManW mailman;

    //  ...
    //  ...

    const wchar_t *filePath = L"c:/example/emailBundle.xml";

    //  ------------------------------------------------------------------------
    //  The LoadXmlFile method is deprecated:

    CkEmailBundleW *bundleObj = mailman.LoadXmlFile(filePath);
    if (mailman.get_LastMethodSuccess() == false) {
        wprintf(L"%s\n",mailman.lastErrorText());
        return;
    }

    //  ...
    //  ...

    delete bundleObj;

    //  ------------------------------------------------------------------------
    //  Do the equivalent using EmailBundle.LoadXml.

    CkEmailBundleW bundle;
    success = bundle.LoadXml(filePath);
    if (success == false) {
        wprintf(L"%s\n",bundle.lastErrorText());
        return;
    }
    }