Sample code for 30+ languages & platforms
AutoIt

Transition from MailMan.LoadXmlEmail to Email.SetFromXmlText

Provides instructions for replacing deprecated LoadXmlEmail method calls with Email.SetFromXmlText.

Chilkat AutoIt Downloads

AutoIt
Local $bSuccess = False

$oMailman = ObjCreate("Chilkat.MailMan")

; ...
; ...

Local $sXmlFilePath = "c:/test/example.xml"

; ------------------------------------------------------------------------
; The LoadXmlEmail method is deprecated:

Local $oEmailObj = $oMailman.LoadXmlEmail($sXmlFilePath)
If ($oMailman.LastMethodSuccess = False) Then
    ConsoleWrite($oMailman.LastErrorText & @CRLF)
    Exit
EndIf

; ...
; ...

; ------------------------------------------------------------------------
; Do the equivalent using Email.SetFromXmlText.

$oSb = ObjCreate("Chilkat.StringBuilder")
$bSuccess = $oSb.LoadFile($sXmlFilePath,"utf-8")
If ($bSuccess = False) Then
    ConsoleWrite($oSb.LastErrorText & @CRLF)
    Exit
EndIf

$oEmail = ObjCreate("Chilkat.Email")
$bSuccess = $oEmail.SetFromXmlText($oSb.GetAsString())
If ($bSuccess = False) Then
    ConsoleWrite($oEmail.LastErrorText & @CRLF)
    Exit
EndIf