Sample code for 30+ languages & platforms
Xojo Plugin Requires Chilkat v11.0.0+

Transition from Email.CreateDsn to Email.ToDsn

Provides instructions for replacing deprecated CreateDsn method calls with ToDsn.

Chilkat Xojo Plugin Downloads

Xojo Plugin
Dim success As Boolean
success = False

Dim email As New Chilkat.Email

//  ...
//  ...

Dim explanation As String
explanation = "..."
Dim statusFieldsXml As String
statusFieldsXml = "..."
Dim headerOnly As Boolean
headerOnly = False

//  ------------------------------------------------------------------------
//  The CreateDsn method is deprecated:

Dim emailObj As Chilkat.Email
emailObj = email.CreateDsn(explanation,statusFieldsXml,headerOnly)
If (email.LastMethodSuccess = False) Then
    System.DebugLog(email.LastErrorText)
    Return
End If

//  ...
//  ...

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

Dim dsnEmail As New Chilkat.Email
success = email.ToDsn(explanation,statusFieldsXml,headerOnly,dsnEmail)
If (success = False) Then
    System.DebugLog(email.LastErrorText)
    Return
End If