![]() |
Chilkat HOME Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi DLL Go Java Node.js Objective-C PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(AutoIt) Transition from MailMan.LoadXmlEmail to Email.SetFromXmlTextProvides instructions for replacing deprecated LoadXmlEmail method calls with Email.SetFromXmlText. Note: This example requires Chilkat v11.0.0 or greater.
$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") Local $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 |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.