Sample code for 30+ languages & platforms
Ruby Requires Chilkat v11.0.0+

Transition from MailMan.LoadXmlString to EmailBundle.LoadXmlString

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

Chilkat Ruby Downloads

Ruby
require 'chilkat'

success = false

mailman = Chilkat::CkMailMan.new()

#  ...
#  ...

xmlBundleStr = "..."

#  ------------------------------------------------------------------------
#  The LoadXmlString method is deprecated:

# bundleObj is a CkEmailBundle
bundleObj = mailman.LoadXmlString(xmlBundleStr)
if (mailman.get_LastMethodSuccess() == false)
    print mailman.lastErrorText() + "\n";
    exit
end

#  ...
#  ...

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

bundle = Chilkat::CkEmailBundle.new()
success = bundle.LoadXmlString(xmlBundleStr)
if (success == false)
    print bundle.lastErrorText() + "\n";
    exit
end