创建一个脚本文件,名字随意,扩展名根据
主题=WScript.Arguments (0) 内容=WScript.Arguments (1) set sh=WScript.CreateObject (“WScript.Shell”) 主机=WScript.FullName If LCase(右(主机、11))=皐script.exe”, ,,,sh.run “cscript //nologo ”“,,, WScript.ScriptFullName ,,装备(34),0 ,,WSCript.Quit 最终获得; sh.Run “用于cmd . exe” WScript.Sleep 1000 sh.SendKeys “telnet” sh.SendKeys(“{进入}”) WScript.Sleep 1000 sh.SendKeys “open smtp.somesome.com 25”, sh.SendKeys(“{进入}”) WScript.Sleep 1000 sh.SendKeys “helo somesome.com”, sh.SendKeys(“{进入}”) WScript.Sleep 500 sh.SendKeys “auth 登录”, sh.SendKeys(“{进入}”) WScript.Sleep 500 sh.SendKeys “xxxxxxx”, sh.SendKeys(“{进入}”) WScript.Sleep 100 sh.SendKeys “xxxxxxx”, sh.SendKeys(“{进入}”) WScript.Sleep 100 sh.SendKeys “mail 从:& lt; test1@somesome.com>”, sh.SendKeys(“{进入}”) WScript.Sleep 500 sh.SendKeys “rcpt : & lt; test1@somesome.com>”, sh.SendKeys(“{进入}”) WScript.Sleep 100 sh.SendKeys “rcpt : & lt; test2@qq.com>”, sh.SendKeys(“{进入}”) WScript.Sleep 100 sh.SendKeys “数据”, sh.SendKeys(“{进入}”) WScript.Sleep 100 sh.SendKeys “: test1”, sh.SendKeys(“{进入}”) WScript.Sleep 100 sh.SendKeys “: test2”, sh.SendKeys(“{进入}”) WScript.Sleep 100 sh.SendKeys “主题:”,,,subject sh.SendKeys(“{进入}”) WScript.Sleep 100 ”“sh.SendKeys sh.SendKeys(“{进入}”) WScript.Sleep 100 sh.SendKeys content sh.SendKeys(“{进入}”) WScript.Sleep 100 ”“sh.SendKeys sh.SendKeys(“{进入}”) WScript.Sleep 100 sh.SendKeys “。”, sh.SendKeys(“{进入}”) WScript.Sleep 100 sh.SendKeys(“{进入}”) WScript.Sleep 1000 sh.SendKeys “退出”, sh.SendKeys(“{进入}”) WScript.Sleep 5000 sh.SendKeys(“{进入}”) WScript.Sleep 2000 sh.SendKeys “退出”, sh.SendKeys(“{进入}”) WScript.Sleep 100 sh.SendKeys(“退出{进入}”) WScript。退出
启动脚本,传入参数:
cscript //Nologo SendMail3.vbs 主题——% %,content111