溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

Blat-windows cmd命令行腳本SMTP模式發(fā)郵件的開源工具參數(shù)詳細(xì)說明

發(fā)布時間:2020-08-05 02:07:26 來源:網(wǎng)絡(luò) 閱讀:1774 作者:nn1183 欄目:系統(tǒng)運維

Blat-windows cmd命令行腳本SMTP模式發(fā)郵件的開源工具參數(shù)詳細(xì)說明

blat工具可以在命令行下使用發(fā)郵件,所以可能被×××用來盜取計算機文件。
所以(1)不建議安裝部署到system32目錄,也不要去設(shè)置環(huán)境變量; 建議自己編寫的腳本與blat工具放在同一個目錄即可;
(2)此工具會被360等安全軟件報毒,所以安裝部署前要先受信文件夾;
(3)英文本來源官網(wǎng),中文版為理解學(xué)習(xí)對照 不保證翻譯的準(zhǔn)確性


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
——看不太懂!看個簡單的用法:


Blat -body "test mail" -s "測試test" -t nn1183@qq.com -server smtp.qq.com -f 442624872@qq.com -u 442624872@qq.com -pw lcgcaflcjewvb


——郵件內(nèi)容:test mail ;郵件主題:測試test ;收件人:n1183@qq.com ;發(fā)件人服務(wù)器:smtp.qq.com ;發(fā)件人:442624872@qq.com ; 賬號:442624872@qq.com ; 密碼:lcgcaflcjewvb;更多功能在這行命令的基礎(chǔ)上去優(yōu)化完善即可;


blat -h


——查看詳細(xì)命令參數(shù):

------------Installation (初始化設(shè)置) -----------

-install[SMTP|NNTP|POP3] <server addr> <sender's 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
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)

——設(shè)置服務(wù)器地址、發(fā)信郵箱、失敗嘗試次數(shù)、端口號、發(fā)信郵箱用戶名、發(fā)信郵箱密碼;
——端口號如果不設(shè)置,默認(rèn):SMTP=25, NNTP=119, POP3=110
——用戶名和密碼可以存到注冊表中。

-------- 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.
——郵件內(nèi)容文件路徑;如果是命令行的內(nèi)容要 -body開頭;
個人覺得使用文件路徑比較好。

-of <file> : text file containing more options (also -optionfile)

-to <recipient> : recipient list (also -t) (comma separated)

——收件人名單;逗號分隔;簡寫"-t"。

-tf <file> : recipient list filename

——收件人名單文件路徑。

-cc <recipient> : carbon copy recipient list (also -c) (comma separated)
——抄送人名單;逗號分隔;簡寫"-c"。

-cf <file> : cc recipient list filename
——抄送人名單文件路徑。

-bcc <recipient>: blind carbon copy recipient list (also -b)(comma separated)
——密送人名單;逗號分隔;簡"-b"。

-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)

——郵件主題;簡寫"-s";

-ss : suppress subject line if not defined
-sf <file> : file containing subject line

——包含主題的郵件內(nèi)容;

-body <text> : message body, surround with quotes to include spaces

——命令行郵件內(nèi)容;

-sig <file> : text file containing your email signature
——簽名內(nèi)容文件路徑;

-tag <file> : text file containing taglines, to be randomly chosen
-ps <file> : final message text, possibly for unsubscribe instructions

--------- Registry overrides (發(fā)件參數(shù)) -----------

-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)

——服務(wù)器地址;

-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
-f <sender> : override the default sender address (must be known to server)

——發(fā)件人郵箱;

-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)
——端口號;一般放到server即可;
-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)
-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)

---------- Miscellaneous RFC header switches(交互設(shè)置) --------------
-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
-noh3 : 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

---------------- Attachment and encoding options(附件與設(shè)置) -----------------------
-attach <file> : attach binary file(s) to message (filenames comma separated)

——附件是二進(jìn)制文件路徑;

-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 (NNTP專用參數(shù)選項)-------------
-groups <usenet groups>
: list of newsgroups (comma separated)

---------- Other options ------------------
-h : displays this help (also -?, /?, -help or /help)
-q : suppresses all output to the screen
——關(guān)閉回顯;類似 echo off;

-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.

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI