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:
Debug output there is only ONE email subject is "Verify your account to do more with Outlook.com"
program is not able to get bounce back email in inbox.
could anyone give me some suggestions to handle this problem?
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.
Comments