Sample code for 30+ languages & platforms
AutoIt

Transition from Imap.FetchBundleAsMime to Imap.FetchSingleBd

Provides instructions for replacing deprecated FetchBundleAsMime method calls with FetchSingleBd.

Chilkat AutoIt Downloads

AutoIt
Local $bSuccess = False

$oImap = ObjCreate("Chilkat.Imap")

; ...
; ...

$oMset = ObjCreate("Chilkat.MessageSet")
$bSuccess = $oImap.QueryMbx("FROM joe@example.com",True,$oMset)
; ...
; ...

; ------------------------------------------------------------------------
; The FetchBundleAsMime method is deprecated:

Local $oSaObj = $oImap.FetchBundleAsMime($oMset)
If ($oImap.LastMethodSuccess = False) Then
    ConsoleWrite($oImap.LastErrorText & @CRLF)
    Exit
EndIf

; ...
; ...

; ------------------------------------------------------------------------
; Do the equivalent using FetchSingleBd.

$oImap.AutoDownloadAttachments = True

$oBdMime = ObjCreate("Chilkat.BinData")
Local $bUid = $oMset.HasUids
Local $iNumEmails = $oMset.Count
Local $i = 0
While $i < $iNumEmails
    $bSuccess = $oImap.FetchSingleBd($oMset.GetId($i),$bUid,$oBdMime)
    ; ...
    ; ...

    $i = $i + 1
Wend