I'm developing a VSTO add-in for Outlook, Now I get a bounce back email, which included message ID. How can I trace the original email from this message ID in VSTO program?
VSTO - Outlook how to trace email from Message ID
642 Views Asked by user3259913 At
2
There are 2 best solutions below
0
Dmitry Streblechenko
On
As Eugene mentioned, you need to search for the sent message based on the PR_INTERNET_MESSAGE_ID property. No reason to use Items.Restrict or even Find/FindNext - since you are expecting a single match (unless something is really wrong with your mailbox), a single call to Items.Find is all your need.
Also keep in mind that in the cached Exchange mode PR_INTERNET_MESSAGE_ID will not be set on the items in the Sent Items folder. To work round that, you'd need to open the Sent Items folder in the online mode (you can do that using Extended MAPI in C++/Delphi or Redemption (I am its author) in any language.
Related Questions in C#
- Passing arguments to main in C using Eclipse
- kernel module does not print packet info
- error C2016 (C requires that a struct or union has at least one member) and structs typedefs
- Drawing with ncurses, sockets and fork
- How to catch delay-import dll errors (missing dll or symbol) in MinGW(-w64)?
- Configured TTL for A record(s) backing CNAME records
- Allocating memory for pointers inside structures in functions
- Finding articulation point of undirected graph by DFS
- C first fgets() is being skipped while the second runs
- C std library don't appear to be linked in object file
- gcc static library compilation
- How to do a case-insensitive string comparison?
- C programming: Create and write 2D array of files as function
- How to read a file then store to array and then print?
- Function timeouts in C and thread
Related Questions in OUTLOOK
- Act on Outlook mail item when opened for editing
- Outlook MailItem HTML Formatting Dropdown
- Is there such thing as Outlook Message Delimiter?
- EWS Service.FindItems() throws an exception when using SearchFilter.IsEqualTo
- How to show the appointment page from a form region in outlook
- How to be sure Outlook application has been loaded completely (application.StartUp event)
- Outlook 2013: select multiple emails and autoreply using template
- Access VBA To Send Query Results to Outlook Email in Table Format
- Visual Basic - Screen shot then insert into email
- create a outlook add-in to popup an input text field form for user info
- Table width does not work in Outlook 2010
- Modify background color of MailItem in Outlook 2013 Inbox
- Getting Outlook Window from VSTO Addin
- Too many mistakes: String not correct _1 ; Controlsend?
- Outlook 2013 VBA Public Variable Doesn't Persist
Related Questions in VSTO
- Word Addin not working in 64bit office but working on 32bit office
- Debug Excel VSTO add-in when launched by double-clicking existing file
- Getting Outlook Window from VSTO Addin
- change the Label of a button in ribbon word add in
- Converting Text Document from English to Chinese in Tx Text control Winform third party developed tool
- MS-Word paragraph mark (¶) shows in equation mode, how to change normal mode
- C# Word Add-In Trusted Certificate
- How to detect during Tick event if a dialog is open in Word?
- how to copy the text from textbox and paste on outlook message body
- Office incorrectly states "Programmatic Access To Visual Basic Project Is Not Trusted"
- Outlook 2013 VSTO: Determine which calendar an AppointmentItem is on?
- Shapes manipulation slows down while in "Presenter View" mode
- Excel Interop Try Catch causes memory leak I find it hard to believe I have to pick between error handling or leaking memory?
- Word add-in - ribbon
- Searching user tasks by task.body text
Related Questions in EMAIL-BOUNCES
- AWS SES is treating vacation responder as bounce
- Identify original email from Complaint SES notification
- Bounce mail error Read Java
- New Bounce Processing Templates in Mailman
- How can the Return-Path header be different than the actual email bounce recipient?
- Header-variables in bounced emails: what points could have an effect if they are deleted or not?
- handling bounce email w/phpmailer
- Detecting bounced messages by Return-Path header
- How to catch bounced emails in PHP?
- AWS SES - Bounces Not Being Delivered To ReturnPath Address
- Is bounce email handling worth it?
- Catch email bounce
- Cleaning bounce mail
- "This is a permanent error." Is that for the email address or the message?
- Custom Header Information in Postfix Bounce Header
Related Questions in MESSAGEID
- How to get message ID before or after sending email in gmail?
- GCM Message ID In Service Worker Push Event
- Does google pub sub deliver messages to dead letter queues with the same message id?
- Can I mention a message with its ID
- How to convert a message id from discord in the actually text that is written?
- How to get message id of sent message Bot Framework (Teams channel)?
- The SignalR's messageId value
- Telegram-Bot answerInlineQuery no messageID as result
- How to get unique pulsar message id in different case
- How to get messageId from gcm on receiver side
- VSTO - Outlook how to trace email from Message ID
- Get the message content into a command [discord.py]
- ESMTP Postfix Server - prevent overriding Message-ID
- Bad message id generated in python on heroku servers
- PHPMailer: is it possible to set a different message-id for bcc?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You can search for
PR_INTERNET_MESSAGE_IDproperty value. TheDASLname of the property ishttp://schemas.microsoft.com/mapi/proptag/0x1035001F.Use the
Find/FindNextorRestrictmethods of theItemsclass. TheRestrictmethod is an alternative to using theFindmethod orFindNextmethod to iterate over specific items within a collection. TheFindorFindNextmethods are faster than filtering if there are a small number of items. TheRestrictmethod is significantly faster if there is a large number of items in the collection, especially if only a few items in a large collection are expected to be found.But if you need to find items from multiple folders I'd recommend using the
AdvancedSearchmethod instead: