Sign in to follow this  
Followers 0
FOAD

send mail with computer name

4 posts in this topic

#1 ·  Posted (edited)

Hello

It's possible to send by mail at the end of my script the computer name of the PC who execute the script? or to do something else like create a log on a server each time the scipt is execute?

Thanks

Edited by FOAD

Share this post


Link to post
Share on other sites



Hello

It's possible to send by mail at the end of my script the computer name of the PC who execute the script? or to do something else like create a log on a server each time the scipt is execute?

Thanks

To keep a log all tou need to do is get your script to append a line to a text file, this could be at the begining or end of your script. I do not know about the emailing part.


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

Hello

It's possible to send by mail at the end of my script the computer name of the PC who execute the script? or to do something else like create a log on a server each time the scipt is execute?

Thanks

Check out _FileWriteLog() in the helpfile, you could just add that in your script and have a single line to do what you want.

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Hello

It's possible to send by mail at the end of my script the computer name of the PC who execute the script? or to do something else like create a log on a server each time the scipt is execute?

Thanks

If your choice is either sending an e-mail or creating a log file, I would go with the log file--the technique has already been addressed by the above posts.

However, if you would rather send an e-mail with the computer name that sent the e-mail, you can use sendmail to send it out. I have a script which sends me e-mail automatically and it works flawlessly.

In my script which uses sendmail.exe, I use the ControlSendPlus() UDF since ControlSend() has a problem sending shift characters to a window and I wanted to send to a hidden window (don't want my users know they are sending me an e-mail.)

If you would like me to post my code just ask. However, given the choice of log file vs. e-mail, I I would go for the log file.

Edited by SerialKiller

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0