Sample code for 30+ languages & platforms
DataFlex

Transition from MailMan.LoadEml to Email.LoadEml

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

Chilkat DataFlex Downloads

DataFlex
Use ChilkatAx-win32.pkg

Procedure Test
    Boolean iSuccess
    Handle hoMailman
    String sFilePath
    Variant vEmailObj
    Handle hoEmailObj
    Handle hoEmail
    String sTemp1
    Boolean bTemp1

    Move False To iSuccess

    Get Create (RefClass(cComChilkatMailMan)) To hoMailman
    If (Not(IsComObjectCreated(hoMailman))) Begin
        Send CreateComObject of hoMailman
    End

    // ...
    // ...

    Move "c:/dir/example.eml" To sFilePath

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

    Get ComLoadEml Of hoMailman sFilePath To vEmailObj
    If (IsComObject(vEmailObj)) Begin
        Get Create (RefClass(cComChilkatEmail)) To hoEmailObj
        Set pvComObject Of hoEmailObj To vEmailObj
    End
    Get ComLastMethodSuccess Of hoMailman To bTemp1
    If (bTemp1 = False) Begin
        Get ComLastErrorText Of hoMailman To sTemp1
        Showln sTemp1
        Procedure_Return
    End

    // ...
    // ...

    Send Destroy of hoEmailObj

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

    Get Create (RefClass(cComChilkatEmail)) To hoEmail
    If (Not(IsComObjectCreated(hoEmail))) Begin
        Send CreateComObject of hoEmail
    End
    Get ComLoadEml Of hoEmail sFilePath To iSuccess
    If (iSuccess = False) Begin
        Get ComLastErrorText Of hoEmail To sTemp1
        Showln sTemp1
        Procedure_Return
    End



End_Procedure