Use Redemption to retrieve Sender

  • Thread starter Thread starter Jeremy Pastika
  • Start date Start date
J

Jeremy Pastika

I am using CDO to access Exchange emails. I need to
retrieve the Sender's Name and or Email address. I have
attempted to use the Redemption object, but I still get
the security message pop-up stating an application is
attempting to access email you have stored in Outlook.
Any help would be greatly appreciated. Here's some of my
code:


Set sItem = CreateObject("Redemption.SafeMailItem")
Set oItem = objSession.Inbox.Messages(1)
sItem.Item = oItem
strSubject = sItem.Item.Subject
strSentBy = sItem.Item.Sender


ObjSession is a previously declared and logged in
MAPI.Session. I get the pop-up message on the last line
when trying to access the "Sender"


Thank you,
Jeremy
 
By using sItem.Item.Sender, you are accessing the original Outlook item, not the Redemption SafeMailItem. Use sItem.Sender and .SenderAddress instead.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
Back
Top