I am working on a C# application and need to retrieve the email address of the current user. The user is part of a typical Windows office network. I am looking for a way to get this information programmatically.

Here is a rough idea of what I am aiming for:

string emailAddress = CurrentUser.EmailAddress;

Could someone guide me on how to achieve this? What APIs or methods should I use?

Edit
Report