(C++) Transition from MailMan.LoadXmlString to EmailBundle.LoadXmlString
Provides instructions for replacing deprecated LoadXmlString method calls with EmailBundle.LoadXmlString. Note: This example requires Chilkat v11.0.0 or greater.
#include <CkMailMan.h>
#include <CkEmailBundle.h>
void ChilkatSample(void)
{
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;
bool success = bundle.LoadXmlString(xmlBundleStr);
if (success == false) {
std::cout << bundle.lastErrorText() << "\r\n";
return;
}
}
|