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. Anushya
    Replies:
    2
    Views:
    239
    Anushya
    Feb 25, 2004
  2. Bingo

    How to add recipients in Redemption?

    Bingo, Dec 3, 2004, in forum: Microsoft Outlook VBA Programming
    Replies:
    13
    Views:
    402
    Dmitry Streblechenko \(MVP\)
    Dec 7, 2004
  3. Bingo

    Redemption Recipients' AddEx method question

    Bingo, Dec 7, 2004, in forum: Microsoft Outlook VBA Programming
    Replies:
    9
    Views:
    531
    Dmitry Streblechenko \(MVP\)
    Dec 9, 2004
  4. Eddy d'Artois via OfficeKB.com

    Get recipients from addressbook (with redemption)

    Eddy d'Artois via OfficeKB.com, May 5, 2005, in forum: Microsoft Outlook VBA Programming
    Replies:
    6
    Views:
    401
    Eddy d'Artois via OfficeKB.com
    May 9, 2005
  5. Steffen Grellmann

    Help with Redemption (recipients) please

    Steffen Grellmann, Jun 22, 2005, in forum: Microsoft Outlook VBA Programming
    Replies:
    4
    Views:
    1,550
    Steffen Grellmann
    Jun 23, 2005
Loading...

Share This Page