(Tcl) Transition from MailMan.LoadXmlFile to EmailBundle.LoadXml
Provides instructions for replacing deprecated LoadXmlFile method calls with EmailBundle.LoadXml. Note: This example requires Chilkat v11.0.0 or greater.
load ./chilkat.dll
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
|