AutoIt
AutoIt
Transition from Email.CreateDsn to Email.ToDsn
Provides instructions for replacing deprecated CreateDsn method calls with ToDsn.Chilkat AutoIt Downloads
Local $bSuccess = False
$oEmail = ObjCreate("Chilkat.Email")
; ...
; ...
Local $sExplanation = "..."
Local $statusFieldsXml = "..."
Local $bHeaderOnly = False
; ------------------------------------------------------------------------
; The CreateDsn method is deprecated:
Local $oEmailObj = $oEmail.CreateDsn($sExplanation,$statusFieldsXml,$bHeaderOnly)
If ($oEmail.LastMethodSuccess = False) Then
ConsoleWrite($oEmail.LastErrorText & @CRLF)
Exit
EndIf
; ...
; ...
; ------------------------------------------------------------------------
; Do the equivalent using ToDsn.
; Your application creates a new, empty Email object which is passed
; in the last argument and filled upon success.
$oDsnEmail = ObjCreate("Chilkat.Email")
$bSuccess = $oEmail.ToDsn($sExplanation,$statusFieldsXml,$bHeaderOnly,$oDsnEmail)
If ($bSuccess = False) Then
ConsoleWrite($oEmail.LastErrorText & @CRLF)
Exit
EndIf