'Controlling MSG file draft/sent state

I've an Access database that records and saves email on the mailitem_send event.

Saved email looks like:
this

I want email to appear like an already sent email, like:
this

Anything I've tried doesn't change how the file is saved.

EmailAttachment.SaveAs Me.EmailFileLoc & Filename, OlSaveAsType.olMSG


Solution 1:[1]

By the time MailItem.Send or Application.ItemSend event fires, the mail is still unsent (you can cancel the submission). The earliest you can access the message in the sent state with the sender information populated is when it is moved to the Sent Items folder and the Items.ItemAdd event fires.

On a more general note, in your case MailItem.Sent property is false. OOM does not allow to change it at all. On the Extended MAPI level, the MSGFLAG_UNSENT bit can be removed from the PR_MESSAGE_FLAGS property only before the message is saved for the very first time (you can see the property in OutlookSpy - I am its author - if you click the IMessage button). This does not apply to messages saved as MSG files, and you can use Redemption (I am also its author) to change the flag (call RDOSession.GetMessageFromMsgFile / set RDOMail.Sent property to true / call RDOMail.Save)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1