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

Transition from MailMan.LoadXmlFile to EmailBundle.LoadXml

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

Chilkat Tcl Downloads

Tcl

load ./chilkat.dll

set success 0

set mailman [new_CkMailMan]

#  ...
#  ...

set filePath "c:/example/emailBundle.xml"

#  ------------------------------------------------------------------------
#  The LoadXmlFile method is deprecated:

# bundleObj is a CkEmailBundle
set bundleObj [CkMailMan_LoadXmlFile $mailman $filePath]
if {[CkMailMan_get_LastMethodSuccess $mailman] == 0} then {
    puts [CkMailMan_lastErrorText $mailman]
    delete_CkMailMan $mailman
    exit
}

#  ...
#  ...

delete_CkEmailBundle $bundleObj

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

set bundle [new_CkEmailBundle]

set success [CkEmailBundle_LoadXml $bundle $filePath]
if {$success == 0} then {
    puts [CkEmailBundle_lastErrorText $bundle]
    delete_CkMailMan $mailman
    delete_CkEmailBundle $bundle
    exit
}


delete_CkMailMan $mailman
delete_CkEmailBundle $bundle