(Visual Basic 6.0) Transition from MailMan.LoadXmlEmailString to Email.SetFromXmlText
Provides instructions for replacing deprecated LoadXmlEmailString method calls with Email.SetFromXmlText. Note: This example requires Chilkat v11.0.0 or greater.
Dim mailman As New ChilkatMailMan
' ...
' ...
Dim xmlStr As String
xmlStr = "..."
' ------------------------------------------------------------------------
' The LoadXmlEmailString method is deprecated:
Dim emailObj As ChilkatEmail
Set emailObj = mailman.LoadXmlEmailString(xmlStr)
If (mailman.LastMethodSuccess = 0) Then
Debug.Print mailman.LastErrorText
Exit Sub
End If
' ...
' ...
' ------------------------------------------------------------------------
' Do the equivalent using Email.SetFromXmlText.
Dim email As New ChilkatEmail
Dim success As Long
success = email.SetFromXmlText(xmlStr)
If (success = 0) Then
Debug.Print email.LastErrorText
Exit Sub
End If
|