Sample code for 30+ languages & platforms
C++

Transition from MailMan.LoadXmlString to EmailBundle.LoadXmlString

Provides instructions for replacing deprecated LoadXmlString method calls with EmailBundle.LoadXmlString.

Chilkat C++ Downloads

C++
#include <CkMailMan.h>
#include <CkEmailBundle.h>

void ChilkatSample(void)
    {
    bool success = false;

    CkMailMan mailman;

    //  ...
    //  ...

    const char *xmlBundleStr = "...";

    //  ------------------------------------------------------------------------
    //  The LoadXmlString method is deprecated:

    CkEmailBundle *bundleObj = mailman.LoadXmlString(xmlBundleStr);
    if (mailman.get_LastMethodSuccess() == false) {
        std::cout << mailman.lastErrorText() << "\r\n";
        return;
    }

    //  ...
    //  ...

    delete bundleObj;

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

    CkEmailBundle bundle;
    success = bundle.LoadXmlString(xmlBundleStr);
    if (success == false) {
        std::cout << bundle.lastErrorText() << "\r\n";
        return;
    }
    }