Can you access othe rproperties (such as PR_DISPLAY_NAME)?
Note that PR_SMTP_ADDRESS is not guarentee to be present.
Secondly, keep in mind that MAPIUtils object is being deprecated, use RDOSession instead.
Off the top of my head:
set Session = CreateObject("Redemption.RDOSession")
Session.MAPIOBJECT = Application.Session.MAPIOBJECT
....
set AE = Session.GetAddressEntryFromID(mail.Recipients[1].EntryID)
MsgBox AE.SmtpAddress
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"BVM" wrote in message ...
Hi,
I need to retrieve recipients' email addresses and sender's email address when an ItemSend event is raised. I just cannot get them, even I use Redemption MapiUtils. Like string lsAddresseeEmail = (string)utils.HrGetOneProp(mail.Recipients[1].AddressEntry.MAPIOBJECT, PrSMTPAddress);
Is it because the email has not really been sent, so I cannot get them? Is there any way to get the email addresses?
I am using Windows XP, Outlook 2003 and VS2005
Thanks,
Danny