blat命令列發郵件小工具【簡單使用技巧】
Blat 是一個命令列發郵件的小工具,僅支援簡單的SMTP協議,需要SMTP伺服器的支援。
據說現在新申請的郵箱已經不支援SMTP服務了,是為了抑制垃圾郵件而採取的措施。
但是,Blat也是一個非常方便的小工具,基本上可以滿足一般人的需求。
簡單使用方法:
在控制檯中切換到Blat.exe V2.6.2檔案所在地址(僅需Blat.exe檔案);
配置Blat的SMTP伺服器:
blat -install sever usr try port [profile]
163郵箱舉例:
blat -install smtp.163.com [email protected] 3 25
其中的smtp.163.com是163的smtp伺服器地址;
[profile]指的是這個配置檔案的名稱,可以不填,也可以自己用一個名字,等到傳送郵件的時候,就可以使用-p選項來指定配置,如果同時使用多個郵箱的話,這個就很方便了。
傳送郵件:
blat C:/mail.txt -to [email protected] -attach "C:/fujia.txt" -s "zhuti" -u [email protected] -pw password -charset Gb2312
其中的mail是寫好的郵件檔案(郵件正文,已檔案方式儲存),-to
顯示資訊:
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
如果只是以上資訊,而沒有錯誤提示,那麼郵件就傳送成功了。
附:
Blat v2.6.2 w/GSS encryption (build : Feb 25 2007 12:06:19)
Win32 console utility to send mail via SMTP or post to usenet via NNTP
by P.Mendes,M.Neal,G.Vollant,T.Charron,T.Musson,H.Pesonen,A.Donchey,C.Hyde
http://www.blat.net
syntax:
Blat <filename> -to <recipient> [optional switches (see below)]
Blat -install <server addr> <sender's addr> [<try>[<port>[<profile>]]] [-q]
Blat -profile [-delete | "<default>"] [profile1] [profileN] [-q]
Blat -h
-------------------------------- Installation ---------------------------------
-install[SMTP|NNTP|POP3|IMAP] <server addr> <sender email addr> [<try n times>
[<port> [<profile> [<username> [<password>]]]]]
: set server, sender, number of tries and port for profile
(<try n times> and <port> may be replaced by '-')
port defaults are SMTP=25, NNTP=119, POP3=110, IMAP=143
default profile can be specified with a '-'
username and/or password may be stored to the registry
order of options is specific
use -installNNTP for storing NNTP information
use -installPOP3 for storing POP3 information
(sender and try are ignored, use '-' in place of these)
use -installIMAP for storing IMAP information
(sender and try are ignored, use '-' in place of these)
--------------------------------- The Basics ----------------------------------
<filename> : file with the message body to be sent
if your message body is on the command line, use a hyphen (-)
as your first argument, and -body followed by your message
if your message will come from the console/keyboard, use the
hyphen as your first argument, but do not use -body option.
-of <file> : text file containing more options (also -optionfile)
-to <recipient> : recipient list (also -t) (comma separated)
-tf <file> : recipient list filename
-cc <recipient> : carbon copy recipient list (also -c) (comma separated)
-cf <file> : cc recipient list filename
-bcc <recipient>: blind carbon copy recipient list (also -b)
(comma separated)
-bf <file> : bcc recipient list filename
-maxNames <x> : send to groups of <x> number of recipients
-ur : set To: header to Undisclosed Recipients if not using the
-to and -cc options
-subject <subj> : subject line, surround with quotes to include spaces(also -s)
-ss : suppress subject line if not defined
-sf <file> : file containing subject line
-body <text> : message body, surround with quotes to include spaces
-sig <file> : text file containing your email signature
-tag <file> : text file containing taglines, to be randomly chosen
-ps <file> : final message text, possibly for unsubscribe instructions
----------------------------- Registry overrides ------------------------------
-p <profile> : send with server, user, and port defined in <profile>
: use username and password if defined in <profile>
-profile : list all profiles in the Registry
-server <addr> : specify SMTP server to be used (optionally, addr:port)
-serverSMTP <addr>
: same as -server
-serverNNTP <addr>
: specify NNTP server to be used (optionally, addr:port)
-serverPOP3 <addr>
: specify POP3 server to be used (optionally, addr:port)
when POP3 access is required before sending email
-serverIMAP <addr>
: specify IMAP server to be used (optionally, addr:port)
when IMAP access is required before sending email
-f <sender> : override the default sender address (must be known to server)
-i <addr> : a 'From:' address, not necessarily known to the server
-port <port> : port to be used on the SMTP server, defaults to SMTP (25)
-portSMTP <port>: same as -port
-portNNTP <port>: port to be used on the NNTP server, defaults to NNTP (119)
-portPOP3 <port>: port to be used on the POP3 server, defaults to POP3 (110)
-portIMAP <port>: port to be used on the IMAP server, defaults to IMAP (110)
-u <username> : username for AUTH LOGIN (use with -pw)
-pw <password> : password for AUTH LOGIN (use with -u)
-pu <username> : username for POP3 LOGIN (use with -ppw)
-ppw <password> : password for POP3 LOGIN (use with -pu)
-iu <username> : username for IMAP LOGIN (use with -ppw)
-ipw <password> : password for IMAP LOGIN (use with -pu)
---------------------- Miscellaneous RFC header switches ----------------------
-organization <organization>
: Organization field (also -o and -org)
-ua : include User-Agent header line instead of X-Mailer
-x <X-Header: detail>
: custom 'X-' header. eg: -x "X-INFO: Blat is Great!"
-noh : prevent X-Mailer/User-Agent header from showing Blat homepage
-noh2 : prevent X-Mailer header entirely
-d : request disposition notification
-r : request return receipt
-charset <cs> : user defined charset. The default is ISO-8859-1
-a1 <header> : add custom header line at the end of the regular headers
-a2 <header> : same as -a1, for a second custom header line
-dsn <nsfd> : use Delivery Status Notifications (RFC 3461)
n = never, s = successful, f = failure, d = delayed
can be used together, however N takes precedence
-hdrencb : use base64 for encoding headers, if necessary
-hdrencq : use quoted-printable for encoding headers, if necessary
-priority <pr> : set message priority 0 for low, 1 for high
-sensitivity <s> : set message sensitity 0 for personal, 1 for private,
2 for company-confidential
----------------------- Attachment and encoding options -----------------------
-attach <file> : attach binary file(s) to message (filenames comma separated)
-attacht <file> : attach text file(s) to message (filenames comma separated)
-attachi <file> : attach text file(s) as INLINE (filenames comma separated)
-embed <file> : embed file(s) in HTML. Object tag in HTML must specify
content-id using cid: tag. eg: <img src="cid:image.jpg">
-af <file> : file containing list of binary file(s) to attach (comma
separated)
-atf <file> : file containing list of text file(s) to attach (comma
separated)
-aef <file> : file containing list of embed file(s) to attach (comma
separated)
-base64 : send binary files using base64 (binary MIME)
-uuencode : send binary files UUEncoded
-enriched : send an enriched text message (Content-Type=text/enriched)
-unicode : message body is in 16- or 32-bit Unicode format
-html : send an HTML message (Content-Type=text/html)
-alttext <text> : plain text for use as alternate text
-alttextf <file>: plain text file for use as alternate text
-mime : MIME Quoted-Printable Content-Transfer-Encoding
-8bitmime : ask for 8bit data support when sending MIME
-multipart <size>
: send multipart messages, breaking attachments on <size>
KB boundaries, where <size> is per 1000 bytes
-nomps : do not allow multipart messages
---------------------------- NNTP specific options ----------------------------
-groups <usenet groups>
: list of newsgroups (comma separated)
-------------------------------- Other options --------------------------------
-xtndxmit : Attempt to use POP3 to transmit when accessing POP3 first
-h : displays this help (also -?, /?, -help or /help)
-q : suppresses all output to the screen
-debug : echoes server communications to a log file or screen
(overrides -q if echoes to the screen)
-log <file> : log everything but usage to <file>
-timestamp : when -log is used, a timestamp is added to each log line
-ti <n> : set timeout to 'n' seconds. Blat will wait 'n' seconds for
server responses
-try <n times> : how many times blat should try to send (1 to 'INFINITE')
-binary : do not convert ASCII | (pipe, 0x7c) to CrLf in the message
body
-hostname <hst> : select the hostname used to send the message via SMTP
this is typically your local machine name
-raw : do not add CR/LF after headers
-delay <x> : wait x seconds between messages being sent when used with
-maxnames or -multipart
-comment <char> : use this character to mark the start of commments in
options files and recipient list files. The default is ;
-superdebug : hex/ascii dump the data between Blat and the server
-superdebugT : ascii dump the data between Blat and the server
-------------------------------------------------------------------------------
Note that if the '-i' option is used, <sender> is included in 'Reply-to:'
and 'Sender:' fields in the header of the message.
Optionally, the following options can be used instead of the -f and -i
options:
-mailfrom <addr> The RFC 821 MAIL From: statement
-from <addr> The RFC 822 From: statement
-replyto <addr> The RFC 822 Reply-To: statement
-returnpath <addr> The RFC 822 Return-Path: statement
-sender <addr> The RFC 822 Sender: statement
For backward consistency, the -f and -i options have precedence over these
RFC 822 defined options. If both -f and -i options are omitted then the
RFC 821 MAIL FROM statement will be defaulted to use the installation-defined
default sender address.
相關推薦
blat命令列發郵件小工具【簡單使用技巧】
Blat 是一個命令列發郵件的小工具,僅支援簡單的SMTP協議,需要SMTP伺服器的支援。 據說現在新申請的郵箱已經不支援SMTP服務了,是為了抑制垃圾郵件而採取的措施。 但是,Blat也是一個非常方便的小工具,基本上可以滿足一般人的需求。 簡單使用方法: 在控制檯中切換到Blat.exe V2.6.
【工具】輕量級 linux 命令列發郵件工具--SendEmail
An Email Program for Sending SMTP Mail from a Command Line About SendEmail SendEmail is a lightweight, command line SMTP email clien
用命令列發郵件——讓你更加了解smtp
轉載自:http://www.cnblogs.com/fanyong/p/3498670.html SMTP 首先介紹下smtp協議——簡單郵件傳輸協議 (Simple Mail Transfer Protocol, SMTP) 是事實上的在Internet傳輸email的
sendmail-命令列發郵件利器
前段時間公司的一個專案剛剛上線,為了每天都能夠檢視系統中昨天出現的問題等各種關鍵資訊,開發人員每天都遠端登陸系統拿到產生的系統日誌等其他檔案,由於遠端登陸還需要VPN,使用起來相當繁瑣,並且效率不高,為此花掉的時間也挺多的.想了一想如何解決這個問題,得出的結論這種重複無意義
HDU2044 一隻小蜜蜂...【簡單DP】
一隻小蜜蜂... Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 97776 Accepted Submi
Mac下命令行發郵件【搭配php(shell_exec...)等腳本語言,輕松發郵件,告別各種依賴庫】
-1 mtp ima .cn 令行 輕量 -- 語言 郵件 用到的是msmtp,一個smtp客戶端,比sendmail,postfix更加輕量。用自己的QQ郵箱(163...)發郵件的話,很適合。 Mac下安裝很簡單,一句話:brew install msmtp
【Python】一鍵式發郵件小指令碼
工作中涉及到給客戶定時發郵件,這裡提供一個Python小指令碼,單獨放進一個py小檔案,每次用時import一下非常簡單方便。 # !/usr/bin/python # -*- coding: utf-8 -*- # # create_author: (JAVA
初識Django(郵件小工具)
1 、建立專案 startapp+app 2、將html檔案貼上,static資料夾貼上 3、在目錄中新建urls 4、在settings中新增app名稱,並且在最下邊寫如下程式碼 STATIC_URL = '/static/' STATICFILES_DIRS = [ os.p
linux命令列todo列表管理工具Taskwarrior介紹
Taskwarrior 是一款在命令列下使用的TODO列表管理工具,或者說任務管理工具,靈活,快速,高效。 安裝 在ubuntu 14.04 中,可從官方倉庫安裝task軟體包 sudo apt-get install task 在ubuntu18.04中,可從官方倉庫安裝taskwarrior軟體
kubectl&docker容器命令列視窗太小
#k8s kubectl exec -ti busybox env COLUMNS=$COLUMNS LINES=$LINES bash #k8s example kubectl exec -ti &n
Cobra 一個快速建立命令列應用程式的工具
概述cobra庫是golang的一個開源第三方庫,能夠快速便捷的建立命令列應用程式。優勢:cobra可以快速建立CLI程式,使我們更專注於命令需要處理的具體的業務邏輯。舉兩個例子:hugo server --port=1313git clone URL --bare都是命令列
命令列的全文搜尋工具--ack
想必大家在命令列環境下工作時候,一定有想要查詢當前目錄下的原始碼檔案中的某些字元的需求,這時候如果使用傳統方案,你可能需要輸入一長串的命令,比如這樣: 1. grep -R 'string' dir/ 或者 grep -r -e string directory 2. grep -rnw 'dire
時間都去哪兒了?開源一個統計iPhone上App執行時間和開啟次數的小工具【iOS8已失效】
如今,大家每天都有大量時間花在手機上,但是,大家有沒有想過自己的時間都花在哪些App上了呢?相信很多人都有這樣的需求,不過iOS系統本身並不能顯示每個App的執行時間和次數,因此,本人寫了這樣一個小工具,可以在後臺進行監控當前使用的App,對App的開啟次數和執行時間進行統計,可以顯示今日、
windows從cmd中鍵入命令的一些常用小工具
Desk.cpl:顯示 Intl.cpl:區域語言選項 Joy.cpl:遊戲控制器 Main.cpl:滑鼠 Mlcfg.cpl:郵件 Mmsys.cpl:聲音和音訊裝置 Ncpa.cpl:網路連線 Powercfg.cpl:電源管理 Sysd
排名前10位的Windows隱藏祕密的命令列和各種小竅門 1
對於那些誰沒有使用DOS命令,Windows命令提示符工具,它的許多命令看起來枯燥,甚至第一眼相對無用,但誰曾經使用命令提示符經常可以告訴你,任何人,有多少愛! 這裡有一些命令提示符和各種小竅門,可以與PC /膝上型電腦讓您的生活更輕鬆: #1使用Ctrl-C來中止正在執行的命令 就像任何命令可
轉載好用的小工具 【who-lock-me】
Google搜尋:who-lock-me 安裝後右鍵程序就可知道檔案被什麼呼叫了 WhoLockMe Explorer Extension v2.0 beta (NT-Win2K-XP) To download this freeware Dr. Hoi
bdtrans 一個命令列下的機器翻譯工具
現如今,機器翻譯技術已經越來越成熟了,儘管從整體來看機器翻譯的結果還不是特別如意,但是也足以應付一般的翻譯需求了。近幾年機器翻譯平臺層出不窮,國外比較出名的翻譯平臺有Google翻譯、必應翻譯等,國內比較出名的也有百度翻譯、有道翻譯等。 中國的百度公司在人工智慧層面做的還算是蠻不錯的(雖然它的搜尋一
JVM 第五篇:命令列 JVM 故障處理工具
![](https://cdn.geekdigging.com/java/java_header.jpg) > 本文內容過於硬核,建議有 Java 相關經驗人士閱讀。 ## 1. 引言 雖然我們前面介紹了各種圖形化 JVM 故障處理工具,但是很多情況下,我們在處理問題的時候並沒有圖形化的操作環境可以使用
VC小工具.最簡單TCP服務器
error 接收數據 target ise style net socket span ++ 1、C++基於TCP_IP簡單的客戶端、服務器通信程序實例 - happy_xiahuixiax的博客 - CSDN博客.html(https://blog.csdn.net/ha
VC小工具.最簡單TCP伺服器
1、C++基於TCP_IP簡單的客戶端、伺服器通訊程式例項 - happy_xiahuixiax的部落格 - CSDN部落格.html(https://blog.csdn.net/happy_xiahuixiax/article/details/72627426) 2、 3、程式碼:(VC6 編譯通過,未