(VB.NET) Transition from Imap.FetchSequenceAsMime to Imap.FetchSingleBd
Provides instructions for replacing deprecated FetchSequenceAsMime method calls with FetchSingleBd. Note: This example requires Chilkat v11.0.0 or greater.
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
Dim success As Boolean = 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
|