Sample code for 30+ languages & platforms
Visual Basic 6.0

Transition from MailMan.LoadEml to Email.LoadEml

Provides instructions for replacing deprecated MailMan.LoadEml method calls with Email.LoadEml.

Chilkat Visual Basic 6.0 Downloads

Visual Basic 6.0
Dim success As Long
success = 0

Dim mailman As New ChilkatMailMan

' ...
' ...

Dim filePath As String
filePath = "c:/dir/example.eml"

' ------------------------------------------------------------------------
' The MailMan.LoadEml method is deprecated:

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

' ...
' ...

' ------------------------------------------------------------------------
' Do the equivalent using Email.LoadEml.

Dim email As New ChilkatEmail
success = email.LoadEml(filePath)
If (success = 0) Then
    Debug.Print email.LastErrorText
    Exit Sub
End If