Sample code for 30+ languages & platforms
AutoIt

Transition from Imap.FetchSingleHeader to Imap.FetchEmail

Provides instructions for replacing deprecated FetchSingleHeader method calls with FetchEmail.

Chilkat AutoIt Downloads

AutoIt
Local $bSuccess = False

$oImap = ObjCreate("Chilkat.Imap")

; ...
; ...

; ------------------------------------------------------------------------
; The FetchSingleHeader method is deprecated:

Local $oEmailObj = $oImap.FetchSingleHeader(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 = True

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