I'm using c# and Microsoft Outlook interop outlook dll to read and retrieve mails from Outlook (Exchange).
I'm facing issues in parsing the sender email address as the code returns the Exchange address rather than the plain email id. What i want to retrieve is like [email protected] but the output of my code is the Exchange address of the email:
(/O=EXCHANGELABS/OU=EXCHANGE ADMINISTRATIVE GROUP (xxxxxxxxxxx)/CN=RECIPIENTS/CN=XXXXXXX32AD740E69184DC03B2A406F4-XXX XXX)
Code I have tried:
emailItem.Sender
and
emailItem.SenderEmailAddress
How do I convert the Exchange address to an smtp address or how do I retrieve just the smtp address?