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

Transition from Imap.FetchSingle to Imap.FetchEmail

Provides instructions for replacing deprecated FetchSingle method calls with FetchEmail.

Chilkat VB.NET Downloads

VB.NET
Dim success As Boolean = False

Dim imap As New Chilkat.Imap

'  ...
'  ...

'  ------------------------------------------------------------------------
'  The FetchSingle method is deprecated:

Dim emailObj As Chilkat.Email = imap.FetchSingle(1,False)
If (imap.LastMethodSuccess = False) Then
    Debug.WriteLine(imap.LastErrorText)
    Exit Sub
End If


'  ...
'  ...



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

Dim headerOnly As Boolean = False

Dim email As New Chilkat.Email
success = imap.FetchEmail(headerOnly,1,False,email)
If (success = False) Then
    Debug.WriteLine(imap.LastErrorText)
    Exit Sub
End If