How to check if email is draft or not?

Hi there!

Using Openedge 11, I’m trying to find out if a .msg file, or a drag and dropped email from Outlook, is a sent, received or a draft email. Currently, I have this code:

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”.
ELSE
IF L-EMAIL:Properties[Aspose.Email.Mapi.MapiPropertyTag:PR_RECEIVED_BY_ENTRYID] = ? THEN
L-EMAIL-STATUS = “SENT”.
ELSE
L-EMAIL-STATUS = “RECEIVED”.

Determine whether an email is sent or received works fine but determining whether it is a draft is where it breaks down if you use attachments. Is there any better method that always determines if the given email is a draft or not?

@CephDigital

We have logged your requirement in our issue tracking system. We will inform you via this forum thread once there is an update available on it.

We apologize for your inconvenience.

@CephDigital

The ticket ID for your case is EMAILNET-40614.

@CephDigital

The PidTagMessageFlags property value is a bitmask of flags. This means a bitwise operator must be applied to check a specific flag value.

IF L-EMAIL-FLAG = 8 THEN

Please replace above line with following line of code. Hope this helps you.

IF (L-EMAIL-FLAG AND 8) = 8 THEN