Recipient Class

Jun 21, 2010 at 6:04 PM
Hi, I am getting exceptions calling get_email_address() and get_account_name() on some messages. The root cause of it is the absence of MAPI properties 0x39fe and 0x3a00 respectively in certain messages. Did you intend for this methods to throw exceptions and I need to handle them in my code or it is just a bug?
Jun 21, 2010 at 6:18 PM

Yes; the current design is that if you try to read a property (either directly or through a simple helper method) and that property doesn't exist, a key_not_found<propid> exception is thrown. You should be prepared to handle this.

If you don't want to deal with exceptions, all PST objects have a get_prop_bag method. With the property_bag, you can test to see if a property exists before reading it.

Jun 21, 2010 at 6:22 PM
Great. Thank you