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

Transition from Imap.FetchSequenceAsMime to Imap.FetchSingleBd

Provides instructions for replacing deprecated FetchSequenceAsMime method calls with FetchSingleBd.

Chilkat VB.NET Downloads

VB.NET
Dim success As Boolean = False

Dim imap As New Chilkat.Imap

'  ...
'  ...

Dim startSeqNum As Integer = 1
Dim count As Integer = 5

'  ------------------------------------------------------------------------
'  The FetchSequenceAsMime method is deprecated:

Dim sa As Chilkat.StringArray = imap.FetchSequenceAsMime(startSeqNum,count)
If (imap.LastMethodSuccess = False) Then
    Debug.WriteLine(imap.LastErrorText)
    Exit Sub
End If


'  ...
'  ...



'  ------------------------------------------------------------------------
'  Do the equivalent using FetchSingleBd.

imap.AutoDownloadAttachments = True

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

    i = i + 1
End While