Hi everyone, I've been having a hard time with this one... All I'm trying to do is have someone click a batch file that will get their IP address and email it to me, that simple.
So far I have a batch file called GetIP.bat that contains
And a javascript file that contains
I just want the IP address to get sent out. I plan on having variables contain the to:,from:, and subject:. I guess what I'm asking is can a javascript file just send an email without having to use a form to post it? If that makes any sense...
TIA
So far I have a batch file called GetIP.bat that contains
Code:
cscript getip.js
Code:
var request = new ActiveXObject("Msxml2.XMLHTTP"); var notyetready = 1; request.onreadystatechange=function() { if(request.readyState==4) { WScript.Echo(request.responseText); notyetready = 0; } } request.open( "GET", "http://www.whatismyip.com/automation/n09230945.asp", true ); request.send(null); while( notyetready ) { WScript.Sleep( 100 ); }
TIA
Comment