Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sending logon name to an email

Status
Not open for further replies.

bcoates

Programmer
Feb 21, 2006
29
US
How do you write a script that will get the current log-on name and then send it to a specified e-mail. I will be using gmail as my temp smtp server.
 
You can easily grab the user name like this:

Code:
Set WSHNetwork = CreateObject("Wscript.Network")
UserString = WSHNetwork.UserName

Sned the email part you will probably want to use CDO. There have been many posts related to that on this forum. Do a little searching and you should find a full script I posted recently.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top