Jump to content

send mail with computer name


FOAD
 Share

Recommended Posts

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
Link to comment
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.


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

Link to comment
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.
Link to comment
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

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...