Get Active Directory Email of Current User In C#

This one.. was something I thought would be much easier to retrieve when I was developing an Microsoft c# Addin to Outlook, retrieving the current user’s active directory primary email address right?

<br />
/**<br />
 *  get the Current active session<br />
 *  user's email address from the Active<br />
 *  directory. Common in Workspaces.<br />
 *<br />
 *  @Params none<br />
 *  @Returns String<br />
**/<br />
private string getExchangeEmail()<br />
{<br />
     return this.Application.ActiveExplorer().Session.CurrentUser.AddressEntry.GetExchangeUser().PrimarySmtpAddress.ToString();<br />
}<br />

A slight mouthful but, I do hope it saves someone the time to dig through each instance to find what they needed 🙂