Sample code for 30+ languages & platforms
Visual Basic 6.0 Requires Chilkat v11.0.0+

Transition from MailMan.FetchEmail to MailMan.FetchByUidl

Provides instructions for replacing deprecated FetchEmail method calls with FetchByUidl.

Chilkat Visual Basic 6.0 Downloads

Visual Basic 6.0
Dim success As Long
success = 0

Dim mailman As New ChilkatMailMan

'  ...
'  ...

Dim uidl As String
uidl = "123"

'  ------------------------------------------------------------------------
'  The FetchEmail method is deprecated:

Dim emailObj As ChilkatEmail
Set emailObj = mailman.FetchEmail(uidl)
If (mailman.LastMethodSuccess = 0) Then
    Debug.Print mailman.LastErrorText
    Exit Sub
End If

'  ...
'  ...

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

Dim headerOnly As Long
headerOnly = 0
'  Irrelevant because we are not downloading headers-only.
Dim numBodyLines As Long
numBodyLines = 0

Dim emailOut As New ChilkatEmail
success = mailman.FetchByUidl(uidl,headerOnly,numBodyLines,emailOut)
If (success = 0) Then
    Debug.Print mailman.LastErrorText
    Exit Sub
End If