I have an Exchange mailbox with a bunch of Outlook
CodePudding user response:
OOM does not expose any functionality that allows to link a ReportItem
object to the original MailItem
. The best you can do is to retrieve PR_ORIGINAL_SEARCH_KEY
MAPI property (or PR_REPORT_TAG
, which includes both the search key and the store/Sent Items folder entry id) using ReportItem.PropertyAccess.GetProperty
and try to find a matching message in the Sent Items folder. You can see these properties in OutlookSpy (I am its author).
Keep in mind that OOM does not allow to search on the binary (PT_BINARY
) properties in Items.Find/Restrict
.
If using Redemption is an option (I am also its author), it exposes RDOReportItem.FindOriginalItem
method.
Once you have the original item, you can make a copy and try to send it again.
CodePudding user response:
The ReportItem
doesn't represent the original item which is failed to be sent. Also it doesn't contain any relationship with the original mail item, so you will not find any property or method available in the Outlook object model. Your existing solution looks good.
You may also try using the ReportItem.GetConversation method which obtains a Conversation
object that represents the conversation to which this item belongs. So, you may try getting the previous item from the conversation, it could be the original item which has been submitted.