|Page [ 1 ]|
|Basic Outlook Printer Friendly Version|
|Working with Outlook items, folders, recipients; dealing with security; writing event handlers|
Extract / Retrieve Email address's from incoming mail using redemption
Hello I want to Extract / Retrieve recipients (address from TO,CC)from the incoming mail using Redemption for Outlook 2003. I am able to get recipients pointer from SafeMailItem. When i try to itrate trough recipients to get address of the recipient it always give me null. But when i use Outlook::Recipient i get recipients email addresss but for exchange users email address is in the x400 format and i want in smtp format. So i have opted for redemption. How should I proceed to get Recipient from recipients. I am using ATL-COM to devlop addin.
//Follwing is the code for retrieving recipients from SafeMailItem
Redemption::ISafeRecipientsPtr pSafeRecipients = NULL;
//pSafeMailItemptr is valid Redemption::ISafeMailItemptr
hr = pSafeMailItemptr->get_Recipients(&pSafeRecipients);
//I get valid pSafeRecipients pointer
long lCount = pSafeRecipients->Count //here lCount is always 0
Redemption::ISafeRecipientPtr pSafeRecipient = NULL
hr = PSafeRecipients->Get_Item(1,pSafeRecipient)
BSTR bstrAddress = pSafeRecipient->Address
//bstrAddress is always blank though there are recipients??
I am wrong in doing so??
Sanil Talathi 18-Dec-2008 10:11
|Page [ 1 ]|