(AutoIt) 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.
$oMailman = ObjCreate("Chilkat.MailMan")
; ...
; ...
Local $sFilePath = "c:/test/example.mbx"
; ------------------------------------------------------------------------
; The LoadMbx method is deprecated:
Local $oBundleObj = $oMailman.LoadMbx($sFilePath)
If ($oMailman.LastMethodSuccess = False) Then
ConsoleWrite($oMailman.LastErrorText & @CRLF)
Exit
EndIf
; ...
; ...
; ------------------------------------------------------------------------
; Do the equivalent using LoadMbxFile.
; Your application creates a new, empty EmailBundle object which is passed
; in the last argument and filled upon success.
$oBundleOut = ObjCreate("Chilkat.EmailBundle")
Local $bSuccess = $oMailman.LoadMbxFile($sFilePath,$oBundleOut)
If ($bSuccess = False) Then
ConsoleWrite($oMailman.LastErrorText & @CRLF)
Exit
EndIf
|