B4X Requires Chilkat v11.0.0+
B4X
Export HTML and related files into a directory
See more Email Object Examples
Choose a separate directory for each message. UnpackHtml writes the HTML file, exports its related resources, and rewrites links to their local paths. This is useful when images should remain separate files.
Chilkat B4X Downloads
Dim success As Boolean = False
' Assumes Chilkat is unlocked. See Global Unlock Sample.
Dim email As ChilkatEmail
email.Initialize
success = email.LoadEml("inline-image.eml")
If success <> True Then
Log(email.LastErrorText)
Return
End If
If email.HasHtmlBody <> True Then
Log("This message has no HTML body.")
Return
End If
success = email.UnpackHtml("workshop-preview", "index.html", "images")
If success <> True Then
Log(email.LastErrorText)
Return
End If
Log("Saved workshop-preview/index.html and its related files.")