[Solved] Batch to ping IP address then email result

Score
0
Vote Up
February 2, 2012 at 11:13:28 Pacific
Specs: Windows 7, i7/6 gigs

Hi
I have tried to google for this but cant find anything that explains it well enough for me to grasp (im a noob).
Very simply i want to create a batch file that will ping an ip one time and then save that result to a text file, without overwriting the text file. I then want it to email the entire contents of that text file to a named reciepient.

So the script and file (ip.txt) are both on the same windows 7 machine.

When ive seen code for email part i have never understood where the server login details goes as it doesnt seem to be in the code.

tx for any help.


Jump to Best Answer ↓   Report •


#1
Vote Down
Score
0
Vote Up
February 3, 2012 at 09:01:39 Pacific

Best Answer

http://www.petri.co.il/send_mail_fr...

for the sending of mail
to add stuff to a text file use

"command">>"textfile".txt

mike


Reply ↓  Report •

#2
Vote Down
Score
0
Vote Up
February 3, 2012 at 13:28:48 Pacific

yes looks nice but still theres no way to specify login details that i can see. My server needs a login to use the mail server.

Reply ↓  Report •

#3
Vote Down
Score
0
Vote Up
February 3, 2012 at 14:15:36 Pacific

did it with blat!

Reply ↓  Report •

Reply to Message Icon Start New Discussion
Related Posts

« vb script Need some major help with... »