(VB.NET) Transition from Imap.FetchSingle to Imap.FetchEmail
Provides instructions for replacing deprecated FetchSingle method calls with FetchEmail. Note: This example requires Chilkat v11.0.0 or greater.
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
Dim success As Boolean = imap.FetchEmail(headerOnly,1,False,email)
If (success = False) Then
Debug.WriteLine(imap.LastErrorText)
Exit Sub
End If
|