locked
How to get sender's smtp email address from exchange? RRS feed

  • Question

  • Hi, all. Seems the Outlook object module does not expose the smtp address of sender that from Exchange. It only show the LDAP style string.

    I doing some research and found that we can use below code combine with Redemption to get the smtp address of receipt from exchange server, however that will not work for sender. Refer to http://www.pcreview.co.uk/forums/thread-1855557.php

    int PR_EMAIL = 972947486;
    Redemption.SafeMailItem safeMailItem = new Redemption.SafeMailItemClass();
    senderEmailAddress = safeMailItem.Sender.get_Fields(PR_EMAIL).ToString();

    It says I need to search GAL (globle address list?) to create a dummy receipt to get the smtp address. However, my outlook does not working in the same exchange server of sender's. Is that can be done in such situation?

    I also used mdbvu32.exe to searching the detail of that email in MAPI store. It shows the sender's smtp email address in 0x801A PT_STING8(001E), so I think I can use 0x801A001E in Redemption to get the information. However, the get_fields() accept para of int that the 0x801A001E is out of the scope.

    How can I do that? Anyone can help is appreciated.
    Thursday, December 18, 2008 2:14 AM

Answers