(AutoIt) Transition from MailMan.LoadEml to Email.LoadEml
Provides instructions for replacing deprecated MailMan.LoadEml method calls with Email.LoadEml. Note: This example requires Chilkat v11.0.0 or greater.
$oMailman = ObjCreate("Chilkat.MailMan")
; ...
; ...
Local $sFilePath = "c:/dir/example.eml"
; ------------------------------------------------------------------------
; The MailMan.LoadEml method is deprecated:
Local $oEmailObj = $oMailman.LoadEml($sFilePath)
If ($oMailman.LastMethodSuccess = False) Then
ConsoleWrite($oMailman.LastErrorText & @CRLF)
Exit
EndIf
; ...
; ...
; ------------------------------------------------------------------------
; Do the equivalent using Email.LoadEml.
$oEmail = ObjCreate("Chilkat.Email")
Local $bSuccess = $oEmail.LoadEml($sFilePath)
If ($bSuccess = False) Then
ConsoleWrite($oEmail.LastErrorText & @CRLF)
Exit
EndIf
|