Create a script file, name it arbitrarily, extend VBS
Subject=wscript.arguments (0) content=wscript.arguments (1) set sh=wscript.createobject ("WScript.Shell") host= Wscript.fullnameif lcase (Right (host,11)) = "Wscript.exe" Then sh.run " cscript //nologo "" "&NBSP;&&NBSP;WSCRIPT.SCRIPTFULLNAME&NBSP;&&NBSP;CHR (, 0 ) WSCript.QuitEnd Ifsh.Run "cmd.exe" wscript.sleep 1000sh. sendkeys "Telnet" sh. SendKeys ("{Enter}") Wscript.sleep 1000sh. sendkeys "Open smtp.somesome.com 25" sh. SendKeys ("{Enter}") Wscript.sleep 1000sh. sendkeys "Helo somesome.com" sh. SendKeys ("{Enter}") Wscript.sleep 500sh. sendkeys "Auth login" sh. SendKeys ("{Enter}") Wscript.sleep 500sh. sendkeys "xxxxxxx" sh. SendKeys ("{Enter}") Wscript.sleep 100sh. sendkeys "xxxxxxx" sh. SendKeys ("{Enter}") Wscript.sleep 100sh. sendkeys "Mail from:<[email protected]>" sh. SendKeys ("{Enter}") Wscript.sleep 500sh. sendkeys "Rcpt to:<[email protected]>" sh. SendKeys ("{Enter}") Wscript.sleep 100sh. sendkeys "Rcpt to:<[email protected]>" sh. SendKeys ("{Enter}") Wscript.sleep 100sh. sendkeys "Data" sh. SendKeys ("{Enter}") Wscript.sleep 100sh. sendkeys "From:test1" sh. SendKeys ("{Enter}") Wscript.sleep 100sh. sendkeys "To:test2" sh. SendKeys ("{Enter}") Wscript.sleep 100sh. sendkeys "Subject:" & subject sh. SendKeys ("{Enter}") Wscript.sleep 100sh. sendkeys "" sh. SendKeys ("{Enter}") Wscript.sleep 100sh. Sendkeys content sh. SendKeys ("{Enter}") Wscript.sleep 100sh. sendkeys "" sh. SendKeys ("{Enter}") Wscript.sleep 100sh. sendkeys "." sh. SendKeys ("{Enter}") Wscript.sleep 100sh. SendKeys ("{Enter}") Wscript.sleep 1000sh. sendkeys "Quit" sh. SendKeys ("{Enter}") Wscript.sleep 5000sh. SendKeys ("{Enter}") Wscript.sleep 2000sh. sendkeys "Quit" sh. SendKeys ("{Enter}") Wscript.sleep 100sh. SendKeys ("Exit{enter}") Wscript.Quit
To start the script, pass in the parameters:
cscript//nologo Sendmail3.vbs subject-%time% content111
This article is from the "zl1030 Records" blog, so be sure to keep this source http://zl1030.blog.51cto.com/274507/1926402
Automatic e-mail by script under Windows