Sample code for 30+ languages & platforms
AutoIt Requires Chilkat v11.0.0+

Transition from Imap.FetchSingle to Imap.FetchEmail

Provides instructions for replacing deprecated FetchSingle method calls with FetchEmail.

Chilkat AutoIt Downloads

AutoIt
Local $bSuccess = False

$oImap = ObjCreate("Chilkat.Imap")

;  ...
;  ...

;  ------------------------------------------------------------------------
;  The FetchSingle method is deprecated:

Local $oEmailObj = $oImap.FetchSingle(1,False)
If ($oImap.LastMethodSuccess = False) Then
    ConsoleWrite($oImap.LastErrorText & @CRLF)
    Exit
EndIf

;  ...
;  ...

;  ------------------------------------------------------------------------
;  Do the equivalent using FetchEmail.
;  Your application creates a new, empty Email object which is passed 
;  in the last argument and filled upon success.

Local $bHeaderOnly = False

$oEmail = ObjCreate("Chilkat.Email")
$bSuccess = $oImap.FetchEmail($bHeaderOnly,1,False,$oEmail)
If ($bSuccess = False) Then
    ConsoleWrite($oImap.LastErrorText & @CRLF)
    Exit
EndIf