I would like to know the email address of the user (assuming she's in a typical Windows office network). This is in a C# application. Perhaps something to the effect of
CurrentUser.EmailAddress;
I would like to know the email address of the user (assuming she's in a typical Windows office network). This is in a C# application. Perhaps something to the effect of
CurrentUser.EmailAddress;
I didn't want to use the Active Directory option and the other, most selected answer, did not work for me oddly enough.
I searched my code bank and found this which worked fine and with quick response:
Reference
System.DirectoryServices.AccountManagement
, thenOr with a timeout:
If you're behind a Windows domain, you could always grab their email address out of Active Directory.
Here's an example: http://lozanotek.com/blog/articles/149.aspx