Windows下通過腳本自動發(fā)郵件-創(chuàng)新互聯(lián)

創(chuàng)建一個腳本文件,名字隨意,擴展名vbs

成都創(chuàng)新互聯(lián)從2013年成立,是專業(yè)互聯(lián)網(wǎng)技術服務公司,擁有項目成都做網(wǎng)站、網(wǎng)站制作、成都外貿(mào)網(wǎng)站建設網(wǎng)站策劃,項目實施與項目整合能力。我們以讓每一個夢想脫穎而出為使命,1280元九原做網(wǎng)站,已為上家服務,為九原各地企業(yè)和個人服務,聯(lián)系電話:18982081108
subject=WScript.Arguments(0)
content=WScript.Arguments(1)

set sh=WScript.CreateObject("WScript.Shell")
host=WScript.FullName

If LCase(Right(host,11))="wscript.exe" Then
    sh.run "cscript //nologo """ & WScript.ScriptFullName & Chr(34), 0
    WSCript.Quit
End If

sh.Run "cmd.exe"
WScript.Sleep 1000
sh.SendKeys "telnet"
sh.SendKeys("{Enter}")
WScript.Sleep 1000
sh.SendKeys "open smtp.somesome.com 25" 
sh.SendKeys("{Enter}")
WScript.Sleep 1000
sh.SendKeys "helo somesome.com" 
sh.SendKeys("{Enter}")
WScript.Sleep 500
sh.SendKeys "auth login" 
sh.SendKeys("{Enter}")
WScript.Sleep 500
sh.SendKeys "xxxxxxx" 
sh.SendKeys("{Enter}")
WScript.Sleep 100
sh.SendKeys "xxxxxxx" 
sh.SendKeys("{Enter}")
WScript.Sleep 100
sh.SendKeys "mail from:<test1@somesome.com>" 
sh.SendKeys("{Enter}")
WScript.Sleep 500
sh.SendKeys "rcpt to:<test1@somesome.com>" 
sh.SendKeys("{Enter}")
WScript.Sleep 100
sh.SendKeys "rcpt to:<test2@qq.com>" 
sh.SendKeys("{Enter}")
WScript.Sleep 100
sh.SendKeys "data" 
sh.SendKeys("{Enter}")
WScript.Sleep 100
sh.SendKeys "from:test1" 
sh.SendKeys("{Enter}")
WScript.Sleep 100
sh.SendKeys "to:test2" 
sh.SendKeys("{Enter}")
WScript.Sleep 100
sh.SendKeys "subject:" & subject 
sh.SendKeys("{Enter}")
WScript.Sleep 100
sh.SendKeys "" 
sh.SendKeys("{Enter}")
WScript.Sleep 100
sh.SendKeys content 
sh.SendKeys("{Enter}")
WScript.Sleep 100
sh.SendKeys "" 
sh.SendKeys("{Enter}")
WScript.Sleep 100
sh.SendKeys "." 
sh.SendKeys("{Enter}")
WScript.Sleep 100
sh.SendKeys("{Enter}")
WScript.Sleep 1000
sh.SendKeys "quit" 
sh.SendKeys("{Enter}")
WScript.Sleep 5000
sh.SendKeys("{Enter}")
WScript.Sleep 2000
sh.SendKeys "quit" 
sh.SendKeys("{Enter}")
WScript.Sleep 100
sh.SendKeys("exit{Enter}")

WScript.Quit

啟動腳本,傳入?yún)?shù):

cscript //Nologo SendMail3.vbs subject-%time% content111

另外有需要云服務器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務器、裸金屬服務器、高防服務器、香港服務器、美國服務器、虛擬主機、免備案服務器”等云主機租用服務以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應用場景需求。

網(wǎng)站欄目:Windows下通過腳本自動發(fā)郵件-創(chuàng)新互聯(lián)
分享URL:http://www.muchs.cn/article48/cdeoep.html

成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供營銷型網(wǎng)站建設電子商務服務器托管、搜索引擎優(yōu)化、Google、域名注冊

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

外貿(mào)網(wǎng)站制作