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

Transition from Imap.FetchBundle to Imap.FetchMsgSet

Provides instructions for replacing deprecated FetchBundle method calls with FetchMsgSet.

Chilkat VB.NET Downloads

VB.NET
Dim success As Boolean = False

Dim imap As New Chilkat.Imap

'  ...
'  ...

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

'  ------------------------------------------------------------------------
'  The FetchBundle method is deprecated:

Dim bundleObj As Chilkat.EmailBundle = imap.FetchBundle(mset)
If (imap.LastMethodSuccess = False) Then
    Debug.WriteLine(imap.LastErrorText)
    Exit Sub
End If


'  ...
'  ...



'  ------------------------------------------------------------------------
'  Do the equivalent using FetchMsgSet.
'  Your application creates a new, empty EmailBundle object which is passed 
'  in the last argument and filled upon success.

Dim headersOnly As Boolean = False

Dim bundleOut As New Chilkat.EmailBundle
success = imap.FetchMsgSet(headersOnly,mset,bundleOut)
If (success = False) Then
    Debug.WriteLine(imap.LastErrorText)
    Exit Sub
End If