Hoping to get a little help with this one that has stumped me today:
Outlook.MailItem mail = (Outlook.MailItem)Item;
Outlook.Recipients recips = mail.Recipients;
string toField = recips[1].Address;
I'm not getting the actual address returned. I've tried suggestions on the MSDN site with no luck. Specifically, the PR_SMTP_ADDRESS service is dead:
Const PR_SMTP_ADDRESS As String = _
"http://schemas.microsoft.com/mapi/proptag/0x39FE001E"
Thanks very much in advance for any help you all can provide.
Use Recipient.AddressEntry to get the AddressEntry object. Check if the AddressEntry.Type property, if it is SMTP, just use AddressEntry.Address. If it is EX, use AddressEntry.GetExchangeUser.PrimarySmtpAddress.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With