Sample code for 30+ languages & platforms
DataFlex

Transition from Email.GetDigest to Email.GetDigestEmail

Provides instructions for replacing deprecated GetDigest method calls with GetDigestEmail.

Chilkat DataFlex Downloads

DataFlex
Use ChilkatAx-win32.pkg

Procedure Test
    Boolean iSuccess
    Handle hoEmail
    Integer iIndex
    Variant vEmailObj
    Handle hoEmailObj
    Variant vEmailOut
    Handle hoEmailOut
    String sTemp1
    Boolean bTemp1

    Move False To iSuccess

    Get Create (RefClass(cComChilkatEmail)) To hoEmail
    If (Not(IsComObjectCreated(hoEmail))) Begin
        Send CreateComObject of hoEmail
    End

    // ...
    // ...
    Move 0 To iIndex

    // ------------------------------------------------------------------------
    // The GetDigest method is deprecated:

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

    // ...
    // ...

    Send Destroy of hoEmailObj

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

    Get Create (RefClass(cComChilkatEmail)) To hoEmailOut
    If (Not(IsComObjectCreated(hoEmailOut))) Begin
        Send CreateComObject of hoEmailOut
    End
    Get pvComObject of hoEmailOut to vEmailOut
    Get ComGetDigestEmail Of hoEmail iIndex vEmailOut To iSuccess
    If (iSuccess = False) Begin
        Get ComLastErrorText Of hoEmail To sTemp1
        Showln sTemp1
        Procedure_Return
    End



End_Procedure