(Tcl) Transition from MailMan.LoadMbx to MailMan.LoadMbxFile
Provides instructions for replacing deprecated LoadMbx method calls with LoadMbxFile. Note: This example requires Chilkat v11.0.0 or greater.
load ./chilkat.dll
set mailman [new_CkMailMan]
# ...
# ...
set filePath "c:/test/example.mbx"
# ------------------------------------------------------------------------
# The LoadMbx method is deprecated:
# bundleObj is a CkEmailBundle
set bundleObj [CkMailMan_LoadMbx $mailman $filePath]
if {[CkMailMan_get_LastMethodSuccess $mailman] == 0} then {
puts [CkMailMan_lastErrorText $mailman]
delete_CkMailMan $mailman
exit
}
# ...
# ...
delete_CkEmailBundle $bundleObj
# ------------------------------------------------------------------------
# Do the equivalent using LoadMbxFile.
# Your application creates a new, empty EmailBundle object which is passed
# in the last argument and filled upon success.
set bundleOut [new_CkEmailBundle]
set success [CkMailMan_LoadMbxFile $mailman $filePath $bundleOut]
if {$success == 0} then {
puts [CkMailMan_lastErrorText $mailman]
delete_CkMailMan $mailman
delete_CkEmailBundle $bundleOut
exit
}
delete_CkMailMan $mailman
delete_CkEmailBundle $bundleOut
|