How can I tell if a given MAPI message is inbound or outbound?
In a COM addin for Outlook (using Redemption), I need to determine if the message I'm viewing has been received or sent (I only want to act on the inbox). Just viewing the parent folder or the recipients or senders will not work in my case, as incoming and outgoing messages may be grouped in the same (public) folder and there may be multiple valid senders. In addition, there may be internal messages sent from one valid sender to another.
Checking for the presence PR_RECEIVED_BY_*
or PR_RCVD_REPRESENTING_*
identification of incoming messages is also not a complete solution for me, because these properties are set only in the mailbox stores, and the messages I deal with will most often be in the public folder store (more precisely: in public folders with enabled mail support, which also hosts messages sent on behalf of this folder).
I have already used OutlookSpy to compare MAPI properties of various test messages and thought I found something a few times, but so far nothing I have found has turned out to be a sustainable solution in the end (for example, at first PR_MESSAGE_RECIP_ME
it appears to ever was installed on incoming messages and never on outgoing ones, but then I found incoming messages where this property was also missing).
Basically, I'm looking for some property (or value) that's always set to incoming or outgoing messages only .
This should work with at least Exchange 2003 and 2007 and Outlook 2003 and 2007.
Any ideas?
source to share
By itself, an email has no concept of incoming or outgoing. We need to apply a frame of reference to it. Is the incoming message in your organization or inbox? Most systems that calculate the "direction" of email have 3 categories: inbound, outbound, and internal.
If you cannot use a message receiver to determine the flow of a message, you may need to better explain the situation because that would be the best method.
source to share