none
Not able to read outlook object(MailItem) RRS feed

  • Question

  • Hi,

    i am reading unread mail details from outlook by using "MailItem" object in C#. I am able to get the subject property, but i am not able to fetch To/CC/BCC/body details from Outlook. There is no exception i get to find the solution. This same code is working fine in someother system. i think this is only problem with configuration. please give me solution.

    Thanks,

    Rajkumar.R


    • Edited by RAJ KUMAR .R Wednesday, October 28, 2015 7:45 AM
    • Moved by CoolDadTx Wednesday, October 28, 2015 1:54 PM Office related
    Wednesday, October 28, 2015 7:12 AM

All replies

  • Outlook for Developers forum could be of a better assistance on this, maybe a moderator can help moving it there. Also for a quicker assistance you should share the code used in addition to details about the different between the two systems where one is working and other is not.


    Fouad Roumieh

    Wednesday, October 28, 2015 12:39 PM
  • Hello Raj,

    You can use the Recipients property of the MailItem class which returns a Recipients collection that represents all the recipients for the Outlook item. The Type property of the Recipient class returns an integer representing the type of recipient. 

    Depending on the type of recipient, this property returns an integer corresponding to the numeric equivalent of one of the following constants:

    What code exactly do you use?

    Wednesday, October 28, 2015 3:04 PM
  • Where did the message come from? When is your code executed?

    Is that an IMAP4 store? What is the value of the MailItem,DownloadState property?


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Wednesday, October 28, 2015 6:13 PM