Sample code for 30+ languages & platforms
Xojo Plugin

Transition from Imap.FetchBundleAsMime to Imap.FetchSingleBd

Provides instructions for replacing deprecated FetchBundleAsMime method calls with FetchSingleBd.

Chilkat Xojo Plugin Downloads

Xojo Plugin
Dim success As Boolean
success = False

Dim imap As New Chilkat.Imap

// ...
// ...

Dim mset As New Chilkat.MessageSet
success = imap.QueryMbx("FROM joe@example.com",True,mset)
// ...
// ...

// ------------------------------------------------------------------------
// The FetchBundleAsMime method is deprecated:

Dim saObj As Chilkat.StringArray
saObj = imap.FetchBundleAsMime(mset)
If (imap.LastMethodSuccess = False) Then
    System.DebugLog(imap.LastErrorText)
    Return
End If

// ...
// ...

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

imap.AutoDownloadAttachments = True

Dim bdMime As New Chilkat.BinData
Dim bUid As Boolean
bUid = mset.HasUids
Dim numEmails As Int32
numEmails = mset.Count
Dim i As Int32
i = 0
While i < numEmails
    success = imap.FetchSingleBd(mset.GetId(i),bUid,bdMime)
    // ...
    // ...

    i = i + 1
Wend