使用方法:以下內容複製到新建的文字檔案中,把自己的郵箱(試驗用的是
163)使用者名稱(
@.163
不要)跟密碼採用
base64
編碼後替換掉
mail from:<
>(
換成你的郵箱
)。然後儲存為
mail.bat檔案.
再新建乙個文字,裡面寫要發的內容,儲存為
mail.txt
。開啟命令列視窗,轉換到檔案所在目錄,
執行命令:
目的郵箱
[[email protected]] mail.txt
rem begin
rem wuliangyue7
2008-11-12
@echo off
if exist aa.bat
del/s /q aa.bat
if exist aa.vbs
del/s /q aa.vbs
echo set sh=wscript.createobject("wscript.shell")>>aa.vbs
echo wscript.sleep(100)>>aa.vbs
echo sh.sendkeys "open smtp.163.com 25">>aa.vbs
echo wscript.sleep(100)>>aa.vbs
echo sh.sendkeys "">>aa.vbs
echo sh.sendkeys "ehlo aaa">>aa.vbs
echo wscript.sleep(100)>>aa.vbs
echo sh.sendkeys "">>aa.vbs
echo wscript.sleep(100)>>aa.vbs
echo sh.sendkeys "auth login">>aa.vbs
echo wscript.sleep(100)>>aa.vbs
echo sh.sendkeys "">>aa.vbs
echo wscript.sleep(100)>>aa.vbs
echo sh.sendkeys "username">>aa.vbs
echo wscript.sleep(100)>>aa.vbs
echo sh.sendkeys "">>aa.vbs
echo wscript.sleep(100)>>aa.vbs
echo sh.sendkeys "password">>aa.vbs
echo wscript.sleep(100)>>aa.vbs
echo sh.sendkeys "">>aa.vbs
echo wscript.sleep(100)>>aa.vbs
echo sh.sendkeys "mail from:">>aa.vbs
echo wscript.sleep(100)>>aa.vbs
echo sh.sendkeys "">>aa.vbs
echo wscript.sleep(100)>>aa.vbs
echo sh.sendkeys "rcpt to:<%1>">>aa.vbs
echo wscript.sleep(100)>>aa.vbs
echo sh.sendkeys "">>aa.vbs
echo wscript.sleep(100)>>aa.vbs
echo sh.sendkeys "data">>aa.vbs
echo wscript.sleep(100)>>aa.vbs
echo sh.sendkeys "">>aa.vbs
echo wscript.sleep(100)>>aa.vbs
echo sh.sendkeys "from:[email protected]">>aa.vbs
echo wscript.sleep(100)>>aa.vbs
echo sh.sendkeys "">>aa.vbs
echo wscript.sleep(100)>>aa.vbs
echo sh.sendkeys "to:[email protected]">>aa.vbs
echo wscript.sleep(100)>>aa.vbs
echo sh.sendkeys "">>aa.vbs
echo wscript.sleep(100)>>aa.vbs
echo sh.sendkeys "subject:subject">>aa.vbs
echo wscript.sleep(100)>>aa.vbs
echo sh.sendkeys "">>aa.vbs
echo wscript.sleep(100)>>aa.vbs
echo sh.sendkeys "">>aa.vbs
echo wscript.sleep(100)>>aa.vbs
echo ^@echo off>>aa.bat
::echo @echo off>>aa.bat
echo for /f "delims=#" %%%%a in ('type %2') do (>>aa.bat
echo set /p a=^^^"sh.sendkeys ""^>aa.bat
echo set /p a=^^^"%%%%a^>aa.bat
::echo ^echo %%%%a>>aa.bat
echo ^echo ^^^^^^")>>aa.bat
call aa.bat>>aa.vbs
echo wscript.sleep(100)>>aa.vbs
echo sh.sendkeys "">>aa.vbs
echo wscript.sleep(100)>>aa.vbs
echo sh.sendkeys ".">>aa.vbs
echo wscript.sleep(100)>>aa.vbs
echo sh.sendkeys "">>aa.vbs
echo wscript.sleep(100)>>aa.vbs
echo sh.sendkeys "quit">>aa.vbs
echo wscript.sleep(100)>>aa.vbs
echo sh.sendkeys "">>aa.vbs
echo sh.sendkeys "">>aa.vbs
echo sh.sendkeys "">>aa.vbs
echo wscript.sleep(1000)>>aa.vbs
echo sh.sendkeys "quit">>aa.vbs
echo sh.sendkeys "">>aa.vbs
echo sh.sendkeys "quit">>aa.vbs
echo sh.sendkeys "">>aa.vbs
start telnet.exe
aa.vbs
del/s /q aa.bat
del/s /q aa.vbs
rem end
vbs定時傳送郵件
用vbs寫個指令碼,然後用windows平台下的計畫任務來呼叫,每天定時 郵件.dim connstr,conn dim sql,rs,msg sub opendb connstr dsn 51tiao.com uid sa pwd if not isobject conn then set con...
vbs處理陣列 和 Jmail傳送帶附件郵件 亂碼
strdebug 0 if strdebug 0 then getuserforsendpassword end if function getuserforsendpassword dim arrname,objname,arrengname,objengname,arrpwd,objpwd,i,...
VBS 使用指令碼自動傳送郵件
email.from mail mail.com 發件人位址 email.to to mail.com 收件人位址 email.subject mail 郵件標題 email.textbody test 郵件正文 email.addattachment c abc.txt 附件 with email...