Use Redemption to retrieve Sender

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
 
S

Sue Mosher [MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top