PR_SENDER_EMAIL_ADDRESS (&HC1F001E) is isn't guaranteed to be an SMTP
address. If the sender is an internal sender you will get the Exchange DN,
as you've seen.
You can check to see if the address type is SMTP by checking
PR_SENDER_ADDRTYPE (0x0C1E001E), a PT_STRING8 value. In that case you need
to use PR_SMTP_ADDRESS (&H39FE001E).
PR_SMTP_ADDRESS is not available in cached mode. You would use
PR_EMS_AB_PROXY_ADDRESSES (&H800F101E) in cached mode, which is a
PT_MV_STRING8 (string array) property.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
"VebKol" wrote in message
...
Hi
I'm facing problems getting SMTP address from Exchange sender mail
address.
- Using Redemption :-)
I have used this line to loop recipients
PrSMTPAddress = &H39FE001E
SMTPAddress =
utils.HrGetOneProp(MailItem.Recipients(t).AddressE ntry.MAPIOBJECT,
PrSMTPAddress)
And everything is working fine.
But when I try to do the following :
PrSMTPAddress = &HC1F001E
SMTPAddress = utils.HrGetOneProp(MailItem.MAPIOBJECT, PrSMTPAddress)
for the Exchange sender, I only get address like this :
/O=server/OU=FIRST ADMINISTRATIVE GROUP/CN=RECIPIENTS/CN=name
for external senders the mail address is ok :-)
Do any one have a clue ?
--
Regards
OD