Outlook: ReportItem vs. MailItem in Undeliverable Messages
Learn which MAPI properties on a ReportItem message contain useful information.
April 23, 2002
I want to write a program that loops through all undeliverable messages in a folder on my Exchange Server 5.5 machine, but when I try to access these items' Body property, I get an empty text string. What am I doing wrong?
Those undeliverable messages use the ReportItem object rather than a typical message's MailItem object. Although you can use the MailItem.Body property to read the content of a message, a ReportItem object never contains anything in the Body property. The body that you see in the UI is built on the fly from Messaging API (MAPI) properties on the item. To learn which MAPI properties on a ReportItem message contain useful information, consider using a tool such as Dmitry Streblechenko's OutlookSpy (http://www.dimastr.com) or Mdbvu32.exe (which you can find on the Exchange CD-ROM). If you've never worked with MAPI properties or Collaboration Data Objects (CDO) property tags, go to CDOLive (http://www.cdolive.com/cdo10.htm) for a useful primer.
About the Author
You May Also Like