none
How to get the email address of a message recipient (in C++) RRS feed

  • Question

  • If I understand the MAPI docs correctly, a mail recipient's email address is not kept in the recipient table.  So how do you obtain a given recipient's email address?  I've searched around, and I've seen some supposed solutions in VB or .NET, but I don't quite understand what API they're using or how they might translate to C++.  Thank you very much for any help. 


    • Edited by amt528 Thursday, November 14, 2019 6:27 PM
    Thursday, November 14, 2019 6:23 PM

Answers

  • The referenced solutions are using the Outlook Object Model.

    If you want to use MAPI, you should check the columns in the recipient table for PR_ADDRTYPE and PR_EMAIL_ADDRESS.  You could also try IMAPISession::OpenEntry with the ENTRYID from a row in the recipient table and request the IMailUser interface.

    • Marked as answer by amt528 Friday, November 15, 2019 12:37 AM
    Thursday, November 14, 2019 7:20 PM

All replies

  • The referenced solutions are using the Outlook Object Model.

    If you want to use MAPI, you should check the columns in the recipient table for PR_ADDRTYPE and PR_EMAIL_ADDRESS.  You could also try IMAPISession::OpenEntry with the ENTRYID from a row in the recipient table and request the IMailUser interface.

    • Marked as answer by amt528 Friday, November 15, 2019 12:37 AM
    Thursday, November 14, 2019 7:20 PM
  • Yeah, PR_EMAIL_ADDRESS works.  
    Friday, November 15, 2019 12:37 AM