Sample code for 30+ languages & platforms
Xojo Plugin

Transition from Imap.FetchSingleHeader to Imap.FetchEmail

Provides instructions for replacing deprecated FetchSingleHeader method calls with FetchEmail.

Chilkat Xojo Plugin Downloads

Xojo Plugin
Dim success As Boolean
success = False

Dim imap As New Chilkat.Imap

// ...
// ...

// ------------------------------------------------------------------------
// The FetchSingleHeader method is deprecated:

Dim emailObj As Chilkat.Email
emailObj = imap.FetchSingleHeader(1,False)
If (imap.LastMethodSuccess = False) Then
    System.DebugLog(imap.LastErrorText)
    Return
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
headerOnly = True

Dim emailOut As New Chilkat.Email
success = imap.FetchEmail(headerOnly,1,False,emailOut)
If (success = False) Then
    System.DebugLog(imap.LastErrorText)
    Return
End If