windows下命令行發(fā)送郵件blat.exe簡介
下載最新的工具包,解壓并拷貝到操作系統(tǒng)盤的System32 目錄下。我的環(huán)境C:WindowsSystem32.
確認(rèn)文件已經(jīng)拷貝過去:
blat.dll
blat.exe
blat.lib
批命令例子:
----------------- 例子開始 -----------------------------------------
@echo off
:::::::::::::: 參數(shù)設(shè)置::::::::::::::
set from=xxx@163.com
set user=xxx
set pass=xxx
set to=xxx@163.com
set subj=測試
set mail=mail_body.txt
set server=smtp.163.com
set attach=attach.rar
set debug=-debug -log blat.log -timestamp
::::::::::::::::: 運(yùn)行blat :::::::::::::::::
rem blat %mail% -to %to% -base64 -charset Gb2312 -subject %subj% -server %server% -f %from% -u %user% -pw %pass% -attach %attach% %debug%
----------------- 例子結(jié)束 -----------------------------------------
經(jīng)過測試,中文內(nèi)容沒有問題(注意源文件的編碼),支持 163 之類的系統(tǒng),
mail_body.txt : 正文
attach.rar : 附件
新聞熱點(diǎn)
疑難解答
圖片精選