How to get the recipient's email address in Redemption?

Discussion in 'Microsoft Outlook VBA Programming' started by Bingo, Nov 29, 2004.

  1. Bingo

    Bingo Guest

    I use Redemption's SafeRecipient to get both name and
    email address for each recipient. This works fine for
    all my external users but for internal users (on Exchange
    Server), the Address property returns the following string

    /O=CompanyName/OU=State/CN=RECIPIENTS/CN=Name

    How do I get the email addresses for these users in
    Redemption? Thanks.
     
    Bingo, Nov 29, 2004
    #1
    1. Advertisements

  2. Bingo

    Sharad Naik Guest

    Before SafeRecipient.Address
    try SafeRecipient.Resolve

    Sharad

    "Bingo" <> wrote in message
    news:9b9e01c4d62d$045e0740$...
    >
    > I use Redemption's SafeRecipient to get both name and
    > email address for each recipient. This works fine for
    > all my external users but for internal users (on Exchange
    > Server), the Address property returns the following string
    >
    > /O=CompanyName/OU=State/CN=RECIPIENTS/CN=Name
    >
    > How do I get the email addresses for these users in
    > Redemption? Thanks.
     
    Sharad Naik, Nov 29, 2004
    #2
    1. Advertisements

  3. Bingo

    Bingo Guest

    Still the same.


    >-----Original Message-----
    >Before SafeRecipient.Address
    >try SafeRecipient.Resolve
    >
    >Sharad
    >
    >"Bingo" <> wrote in

    message
    >news:9b9e01c4d62d$045e0740$...
    >>
    >> I use Redemption's SafeRecipient to get both name and
    >> email address for each recipient. This works fine for
    >> all my external users but for internal users (on

    Exchange
    >> Server), the Address property returns the following

    string
    >>
    >> /O=CompanyName/OU=State/CN=RECIPIENTS/CN=Name
    >>
    >> How do I get the email addresses for these users in
    >> Redemption? Thanks.

    >
    >
    >.
    >
     
    Bingo, Nov 29, 2004
    #3
  4. You will need to read either the PR_SMTP_ADDRESS (0x39FE001E) or
    PR_EMS_AB_PROXY_ADDRESSES (0x800F101E) property using
    Recipient.AddressEntry.Fields()

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/
    OutlookSpy - Outlook, CDO
    and MAPI Developer Tool


    "Bingo" <> wrote in message
    news:9b9e01c4d62d$045e0740$...
    >
    > I use Redemption's SafeRecipient to get both name and
    > email address for each recipient. This works fine for
    > all my external users but for internal users (on Exchange
    > Server), the Address property returns the following string
    >
    > /O=CompanyName/OU=State/CN=RECIPIENTS/CN=Name
    >
    > How do I get the email addresses for these users in
    > Redemption? Thanks.
     
    Dmitry Streblechenko \(MVP\), Nov 29, 2004
    #4
  5. Bingo

    Bingo Guest

    That solved the issue for recipients. What about for the
    sender's email address? Thanks.

    >-----Original Message-----
    >You will need to read either the PR_SMTP_ADDRESS

    (0x39FE001E) or
    >PR_EMS_AB_PROXY_ADDRESSES (0x800F101E) property using
    >Recipient.AddressEntry.Fields()
    >
    >Dmitry Streblechenko (MVP)
    >http://www.dimastr.com/
    >OutlookSpy - Outlook, CDO
    >and MAPI Developer Tool
    >
    >
    >"Bingo" <> wrote in

    message
    >news:9b9e01c4d62d$045e0740$...
    >>
    >> I use Redemption's SafeRecipient to get both name and
    >> email address for each recipient. This works fine for
    >> all my external users but for internal users (on

    Exchange
    >> Server), the Address property returns the following

    string
    >>
    >> /O=CompanyName/OU=State/CN=RECIPIENTS/CN=Name
    >>
    >> How do I get the email addresses for these users in
    >> Redemption? Thanks.

    >
    >
    >.
    >
     
    Bingo, Nov 29, 2004
    #5
  6. Same thing - SafeMailItem.Sender is Redemption.AddressEntry, same as
    Recipient.AddressEntry, so SafeMailItem.Sender.Fields() will work the same
    way.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/
    OutlookSpy - Outlook, CDO
    and MAPI Developer Tool


    "Bingo" <> wrote in message
    news:9c9701c4d645$c61ad030$...
    > That solved the issue for recipients. What about for the
    > sender's email address? Thanks.
    >
    > >-----Original Message-----
    > >You will need to read either the PR_SMTP_ADDRESS

    > (0x39FE001E) or
    > >PR_EMS_AB_PROXY_ADDRESSES (0x800F101E) property using
    > >Recipient.AddressEntry.Fields()
    > >
    > >Dmitry Streblechenko (MVP)
    > >http://www.dimastr.com/
    > >OutlookSpy - Outlook, CDO
    > >and MAPI Developer Tool
    > >
    > >
    > >"Bingo" <> wrote in

    > message
    > >news:9b9e01c4d62d$045e0740$...
    > >>
    > >> I use Redemption's SafeRecipient to get both name and
    > >> email address for each recipient. This works fine for
    > >> all my external users but for internal users (on

    > Exchange
    > >> Server), the Address property returns the following

    > string
    > >>
    > >> /O=CompanyName/OU=State/CN=RECIPIENTS/CN=Name
    > >>
    > >> How do I get the email addresses for these users in
    > >> Redemption? Thanks.

    > >
    > >
    > >.
    > >
     
    Dmitry Streblechenko \(MVP\), Nov 29, 2004
    #6
  7. Bingo

    Bingo Guest

    Redemption is really COOL! :)



    >-----Original Message-----
    >Same thing - SafeMailItem.Sender is

    Redemption.AddressEntry, same as
    >Recipient.AddressEntry, so SafeMailItem.Sender.Fields()

    will work the same
    >way.
    >
    >Dmitry Streblechenko (MVP)
    >http://www.dimastr.com/
    >OutlookSpy - Outlook, CDO
    >and MAPI Developer Tool
    >
    >
    >"Bingo" <> wrote in

    message
    >news:9c9701c4d645$c61ad030$...
    >> That solved the issue for recipients. What about for

    the
    >> sender's email address? Thanks.
    >>
    >> >-----Original Message-----
    >> >You will need to read either the PR_SMTP_ADDRESS

    >> (0x39FE001E) or
    >> >PR_EMS_AB_PROXY_ADDRESSES (0x800F101E) property using
    >> >Recipient.AddressEntry.Fields()
    >> >
    >> >Dmitry Streblechenko (MVP)
    >> >http://www.dimastr.com/
    >> >OutlookSpy - Outlook, CDO
    >> >and MAPI Developer Tool
    >> >
    >> >
    >> >"Bingo" <> wrote in

    >> message
    >> >news:9b9e01c4d62d$045e0740$...
    >> >>
    >> >> I use Redemption's SafeRecipient to get both name

    and
    >> >> email address for each recipient. This works fine

    for
    >> >> all my external users but for internal users (on

    >> Exchange
    >> >> Server), the Address property returns the following

    >> string
    >> >>
    >> >> /O=CompanyName/OU=State/CN=RECIPIENTS/CN=Name
    >> >>
    >> >> How do I get the email addresses for these users in
    >> >> Redemption? Thanks.
    >> >
    >> >
    >> >.
    >> >

    >
    >
    >.
    >
     
    Bingo, Nov 29, 2004
    #7
  8. Bingo

    kundan_iitg

    Joined:
    Mar 30, 2010
    Messages:
    1
    Likes Received:
    0
    Following is C# code which I wrote to extract email address.

    RDOSession objNsp = new RDOSession();
    objNsp.Logon(null, null, false, true, false, false);



    RDOMail Item = objNsp.GetMessageFromMsgFile(MSGFilePath, false);



    int PR_SENDER_ADDRTYPE = (0xC1E001E);

    int PR_EMAIL = (0x39FE001E);



    Redemption.SafeMailItem objSMail = null;

    Redemption.AddressEntry objSenderAE = null;



    System.Type objDocType = System.Type.GetTypeFromProgID("Redemption.MAPIUtils");

    object objDoc = System.Activator.CreateInstance(objDocType);

    Redemption.MAPIUtils Utils = (Redemption.MAPIUtils)objDoc;

    Utils.MAPIOBJECT = Item.Session.MAPIOBJECT;



    System.Type objSafeMailType = System.Type.GetTypeFromProgID("Redemption.SafeMailItem");

    object safeMailType = System.Activator.CreateInstance(objSafeMailType);

    objSMail = (Redemption.SafeMailItem)safeMailType;

    objSMail.Item = Item;



    objSenderAE = objSMail.Sender;

    if (objSenderAE != null)

    {

    object strType = objSMail.get_Fields(PR_SENDER_ADDRTYPE);

    string emailType = (string)strType;

    if (emailType == "SMTP")

    {

    senderAddress = objSenderAE.SMTPAddress;

    }

    else if (emailType == "EX")

    {

    object a = objSenderAE.get_Fields(PR_EMAIL);

    }

    else

    {

    senderAddress = objSenderAE.Address;

    }

    }



    objSMail = null;

    objSenderAE = null;

    The problem is that I get the senderAddress as ‘null’ when the emailType is “EX”. Your help is approceiated.
     
    kundan_iitg, Mar 30, 2010
    #8
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dmitry Streblechenko

    Re: Can't access recipient address using Redemption

    Dmitry Streblechenko, Sep 5, 2003, in forum: Microsoft Outlook VBA Programming
    Replies:
    0
    Views:
    710
    Dmitry Streblechenko
    Sep 5, 2003
  2. Dmitry Streblechenko

    Re: Can't access recipient address using Redemption

    Dmitry Streblechenko, Sep 5, 2003, in forum: Microsoft Outlook VBA Programming
    Replies:
    1
    Views:
    1,328
    Bill Todd
    Sep 5, 2003
  3. Hendrik Schreiber

    getting SMTP address from Contact using redemption

    Hendrik Schreiber, Oct 20, 2003, in forum: Microsoft Outlook VBA Programming
    Replies:
    12
    Views:
    987
    Hendrik Schreiber
    Oct 23, 2003
  4. Cherry

    Get Recipient address, Mail Content and Attachment

    Cherry, Dec 30, 2003, in forum: Microsoft Outlook VBA Programming
    Replies:
    1
    Views:
    516
    Eric Legault [MVP - Outlook]
    Jan 5, 2004
  5. Stefan Uhlemann

    Error getting recipient at sending new mails with Redemption

    Stefan Uhlemann, Jul 20, 2005, in forum: Microsoft Outlook VBA Programming
    Replies:
    2
    Views:
    369
    Stefan Uhlemann
    Jul 21, 2005
  6. Redemption/Outlook cant set recipient types!!

    , Dec 15, 2005, in forum: Microsoft Outlook VBA Programming
    Replies:
    2
    Views:
    771
  7. TMJNSK

    trying to get recipient email address

    TMJNSK, Oct 15, 2007, in forum: Microsoft Outlook VBA Programming
    Replies:
    0
    Views:
    779
    TMJNSK
    Oct 15, 2007
  8. Ronaldk6

    Redemption: No Recipient readable in the Item_Send Event

    Ronaldk6, Sep 8, 2008, in forum: Microsoft Outlook VBA Programming
    Replies:
    7
    Views:
    409
    Ronaldk6
    Sep 9, 2008
Loading...