擷取程式:
http://www.blat.net/
https://sourceforge.net/projects/blat/files/
配置Blat的SMTP伺服器:
blat -install sever usr try port [profile]
163郵箱舉例:
blat -install smtp.163.com [email protected] 3 25
其中的smtp.163.com是163的smtp伺服器位址;[email protected]是自己的郵箱名,3是指嘗試發送的次數,25是端口号;
[profile]指的是這個配置檔案的名稱,可以不填,也可以自己用一個名字,等到發送郵件的時候,就可以使用-p選項來指定配置,如果同時使用多個郵箱的話,這個就很友善了。
blat -install 192.168.0.212 username password (連密碼一起注冊)
發送郵件:
blat C:/mail.txt -to [email protected] -attach "C:/fujia.txt" -s "zhuti" -u [email protected] -pw password -charset Gb2312
其中的mail是寫好的郵件檔案(郵件正文,已檔案方式儲存),-to [email protected]是收件人的位址,-attach "C:/fujia.txt"是附件位址,-s "zhuti"主題,-u [email protected]登陸伺服器的使用者名,-pw password密碼, -charset Gb2312是中文編碼
顯示資訊:
Blat v2.6.2 w/GSS encryption (build : Feb 25 2007 12:06:19)
Sending C:/mail.txt to [email protected]
Subject: zhuti
Login name is [email protected]
Attached binary file: C:/fujia.txt
如果隻是以上資訊,而沒有錯誤提示,那麼郵件就發送成功了。
echo haha|blat -to [email protected] -s haha(不用文本檔案,直接發)
本文轉自leonardos51CTO部落格,原文連結:http://blog.51cto.com/leomars/1951470 ,如需轉載請自行聯系原作者