Sample code for 30+ languages & platforms
Xojo Plugin

Transition from Imap.FetchSequenceAsMime to Imap.FetchSingleBd

Provides instructions for replacing deprecated FetchSequenceAsMime method calls with FetchSingleBd.

Chilkat Xojo Plugin Downloads

Xojo Plugin
Dim success As Boolean
success = False

Dim imap As New Chilkat.Imap

// ...
// ...

Dim startSeqNum As Int32
startSeqNum = 1
Dim count As Int32
count = 5

// ------------------------------------------------------------------------
// The FetchSequenceAsMime method is deprecated:

Dim sa As Chilkat.StringArray
sa = imap.FetchSequenceAsMime(startSeqNum,count)
If (imap.LastMethodSuccess = False) Then
    System.DebugLog(imap.LastErrorText)
    Return
End If

// ...
// ...

// ------------------------------------------------------------------------
// Do the equivalent using FetchSingleBd.

imap.AutoDownloadAttachments = True

success = False
Dim bdMime As New Chilkat.BinData
Dim bUid As Boolean
bUid = False
Dim i As Int32
i = 0
While i < count
    success = imap.FetchSingleBd(startSeqNum + i,bUid,bdMime)
    // ...
    // ...

    i = i + 1
Wend