User email from %UserName%

cpremesh

Prominent
Jan 30, 2018
1
0
510
Team
Please help me to get user email of current user using command line. This is used to trigger email to current user while executing a windows batch file.

Please help
Thanks
Remesh
 
Solution
The only way to know what the email name is from querying the email server, unless the name is the same as the username. Then just use the %username%.domain.com(org, whatever) format in the mailto command.