DataFlex
DataFlex
Load MIME Object from Email Object
See more Email Object Examples
Demonstrates how to load a Chilkat Mime object from a Chilkat Email object. (Copies the email into a Mime object.)Chilkat DataFlex Downloads
Use ChilkatAx-win32.pkg
Procedure Test
Boolean iSuccess
Handle hoEmail
Variant vSbMime
Handle hoSbMime
Handle hoMime
String sTemp1
Move False To iSuccess
Get Create (RefClass(cComChilkatEmail)) To hoEmail
If (Not(IsComObjectCreated(hoEmail))) Begin
Send CreateComObject of hoEmail
End
Get ComLoadEml Of hoEmail "qa_data/eml/sample.eml" To iSuccess
// Write the full MIME of the email to a StringBuilder.
Get Create (RefClass(cComChilkatStringBuilder)) To hoSbMime
If (Not(IsComObjectCreated(hoSbMime))) Begin
Send CreateComObject of hoSbMime
End
Get pvComObject of hoSbMime to vSbMime
Get ComGetMimeSb Of hoEmail vSbMime To iSuccess
// Load the MIME object from the StringBuilder
Get Create (RefClass(cComChilkatMime)) To hoMime
If (Not(IsComObjectCreated(hoMime))) Begin
Send CreateComObject of hoMime
End
Get pvComObject of hoSbMime to vSbMime
Get ComLoadMimeSb Of hoMime vSbMime To iSuccess
Get ComGetMime Of hoMime To sTemp1
Showln sTemp1
End_Procedure