VB.NET
VB.NET
Transition from Imap.FetchHeaders to Imap.FetchMsgSet
Provides instructions for replacing deprecated FetchHeaders method calls with FetchMsgSet.Chilkat VB.NET Downloads
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 FetchHeaders method is deprecated:
Dim bundleObj As Chilkat.EmailBundle = imap.FetchHeaders(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 = True
Dim bundleOut As New Chilkat.EmailBundle
success = imap.FetchMsgSet(headersOnly,mset,bundleOut)
If (success = False) Then
Debug.WriteLine(imap.LastErrorText)
Exit Sub
End If