[Stackoverflow] [Progress OpenEdge ABL] How to check if an email is a draft, sent or received? (Openedge 11)

Not open for further replies.


I'm trying to create a way to check whether a given email (either from Outlook itself or an MSG file) is a sent, received or a draft email. I got the bit to compare if it was sent or received somewhere else and that works fine but it's the part that determines if it's a draft or not that is the issue. Below is what I have currently.

        L-EMAIL = Aspose.Email.Mapi.MapiMessage:FromFile(P-FILENAME).
        L-EMAIL-FLAG = Integer(L-EMAIL:Properties[Aspose.Email.Mapi.MapiPropertyTag:PR_MESSAGE_FLAGS]:ToString()).
        IF L-EMAIL-FLAG = 8 THEN
            L-EMAIL-STATUS = "DRAFT".
            IF L-EMAIL:Properties[Aspose.Email.Mapi.MapiPropertyTag:PR_RECEIVED_BY_ENTRYID] = ? THEN
                L-EMAIL-STATUS = "SENT".
                L-EMAIL-STATUS = "RECEIVED".

If there's no attachments to the emails, it works fine since the value of a draft email is always 8 but as soon as you add attachments, it gets all weird with the values so I can't get a range down (I've gotten values like 24 and 242613 while a sent email with an attachment has a value of 49). Anyone know a smarter way of telling if it's a draft or not?

Continue reading...
Not open for further replies.