PC Review


Reply
Thread Tools Rate Thread

trying to get recipient email address

 
 
TMJNSK
Guest
Posts: n/a
 
      15th Oct 2007
Hi All,

I have tried access sender's email and receiver's email. I have found
a code to get sender's email.I have used Redemption.safermailitem,
which works cool. But i have trouble in getting the receiver email
address.

I have tried the following items (sample code got it from internet)
Dim utils, MailItem, PrSMTPAddress, SMTPAddress
utils = CreateObject("Redemption.MAPIUtils")
PrSMTPAddress = &H39FE001E
'Get SMT P address of the first recipient. It is
assumed that the recipient is an Exchange Server user.
SMTPAddress =
utils.HrGetOneProp(oMailItem.Recipients(1).AddressEntry.MAPIOBJECT,
PrSMTPAddress)
LogMessage("Receiver Address" + SMTPAddress)

But i am getting the following error at the place of HrGetOneProp -
System.Runtime.InteropServices.COMException (0xA5120009): Property is
read-only.
at Outlook.AddressEntry.set_MAPIOBJECT(Object MAPIOBJECT)
at
DIAMSXe_OutlookAddIn.XMailItem.btnAttachToDIAMSXe_Click(CommandBarButton
ctrl, Boolean& cancel) at Outlook.AddressEntry.set_MAPIOBJECT(Object
MAPIOBJECT)
at
DIAMSXe_OutlookAddIn.XMailItem.btnAttachToDIAMSXe_Click(CommandBarButton
ctrl, Boolean& cancel)Property is read-only.

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.



Issue number 2:
Dim utils1, MailItem1, PrSenderEmailAddress,
SenderEMail
utils1 = CreateObject("Redemption.MAPIUtils")
PrSenderEmailAddress = &HC1F001E
SenderEMail =
utils1.HrGetOneProp(oMailItem.MAPIOBJECT, PrSenderEmailAddress)
LogMessage("Sender Address" + SenderEMail)

When i used this for sender's email, i was getting
"/O=COMPANYDOMAIN/OU=FIRST ADMINISTRATIVE GROUP/CN=RECIPIENTS/
CN=RECEIVERNAME.. "
Is this going to be the same for receiver email too?

Actually, i am looking for Email id. Can some one help me here.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Get recipient's email address Mark B Microsoft Outlook Program Addins 9 18th Mar 2012 08:01 AM
How to get the recipient's email address in Redemption? Bingo Microsoft Outlook VBA Programming 7 30th Mar 2010 07:30 AM
How to get Recipient's SMTP Address from Exchange Address in VC++ vinkal.chudgar@gmail.com Microsoft Outlook Program Addins 3 26th May 2005 06:13 PM
Re: Hiding recipient names in multiple recipient email Roady [MVP] Microsoft Outlook Installation 0 3rd Jun 2004 03:06 PM
Re: Hiding recipient names in multiple recipient email Russ Valentine [MVP-Outlook] Microsoft Outlook Installation 0 3rd Jun 2004 03:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:28 PM.