VSTO Outlook, not able to read bounce back emails in inbox

user3259913

i'm new to develop VSTO.

I'm trying create a function that is able to read bounce back email which located in inbox folder.

here is my code:

Outlook.MAPIFolder inbox = Globals.ThisAddIn.Application.Session.DefaultStore.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox);

foreach (object item in inbox.Items)
{
    Outlook.MailItem mail = item as Outlook.MailItem;
    if (mail != null)
    {
        Debug.WriteLine("Subject:" + mail.Subject);
    }
}

here is my debug output:

enter image description here Debug output there is only ONE email subject is "Verify your account to do more with Outlook.com"

enter image description here

program is not able to get bounce back email in inbox.

could anyone give me some suggestions to handle this problem?

Dmitry Streblechenko

The NDRs are represented by the ReportItem Outlook object, not MailItem. Take a look at the live objects in Outlook with OutlookSpy (click Item button).

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Accountability for emails marked as read in shared inbox (Outlook 2007)

Read emails from Inbox gmail

Outlook VSTO Add-in VB - How to read the subject line of an email opened in the inbox?

Count number of sent and inbox emails in Outlook 2010

Setup an Inbox in Outlook 2016 to not show unread emails

Collecting emails from Outlook Inbox with Delphi

Listing All Emails in Inbox by Outlook Web Addin

How to retrieve Outlook inbox emails using R RDCOMClient?

Console App to search outlook inbox with subject line filter skipping emails

How do I move emails from a folder to the inbox in Outlook?

Quick way to change importance of emails in inbox using Outlook 2010

Revert emails fetched via django-mailbox, back to Gmail inbox

Read all emails from outlook

unable to read outlook emails with javamail

Read Emails from outlook mailbox

Moving read items from a folder back to inbox

VSTO Outlook Addin - Move Selected emails to another Email Accounts

Outlook 2010 "Mark item as read when selection changes" ONLY in Inbox

Reupload emails to POP inbox

Outlook: Dynamic inbox? Live inbox? Filtered inbox?

How to read a bounce back email details with Java mail API?

Does adding an old account as IMAP delete the old emails in inbox on Outlook 2007

Is there any way I can back up Hotmail/Outlook emails in Linux?

VSTO add-in to delete Outlook email after being read

Scheduler in Spring Boot stopped working when I configure an ImapIdleChannelAdapter to read emails from an Inbox

Python : How can I access Lotus Notes 8.5 Inbox to read emails

Outlook Focused Inbox is unavailable?

Keep Outlook Invitations in Inbox

Performance issue with For loop in VSTO C# while getting emails from outlook