China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-11 18:51
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Share] Powerful command-line email sending tool blat.exe View 3,957 Replies 9
Original Poster Posted 2007-11-30 17:28 ·  中国 浙江 温州 电信
中级用户
★★
Credits 458
Posts 196
Joined 2006-10-05 12:04
19-year member
UID 64614
Status Offline
When running some monitoring scripts, when some problems occur, use this tool to send an email to the tom mailbox with one command.

Activate the free new email SMS notification for the tom mailbox, so that you can always know the computer situation when going out :D:D

Plan to write a script to read the mailbox in a loop below, and let the mobile phone input some small commands to control the computer by replying to the email via SMS.

blat website: www.blat.net

Usage method

blat body.txt -to ***@tom.com -base64 -charset Gb2312 -subje
ct "Warning" -server smtp.***.com -u user -pw password
Floor 2 Posted 2007-11-30 17:29 ·  中国 浙江 温州 电信
中级用户
★★
Credits 458
Posts 196
Joined 2006-10-05 12:04
19-year member
UID 64614
Status Offline
The attachment cannot be uploaded...
Floor 3 Posted 2007-12-01 15:46 ·  中国 甘肃 兰州 电信
金牌会员
★★★★
Credits 4,103
Posts 1,744
Joined 2006-01-20 13:00
20-year member
UID 49241
Gender Male
From 甘肃.临泽
Status Offline
Let the mobile phone input some small commands to control the computer by replying to emails via text messages? Not very understanding the meaning of this paragraph, give some guidance
Floor 4 Posted 2007-12-01 20:18 ·  中国 北京 联通
银牌会员
★★★
Credits 1,287
Posts 634
Joined 2007-05-02 15:06
19-year member
UID 87277
Gender Male
From cmd.exe
Status Offline
This kind of thing put in the BAT is a bit too exposed. It's very easy to lose the email password...
Floor 5 Posted 2009-01-21 13:07 ·  中国 湖北 武汉 电信
新手上路
Credits 1
Posts 1
Joined 2009-01-20 13:19
17-year member
UID 137094
Gender Male
Status Offline
Got a bit tired of looking!
Floor 6 Posted 2009-04-16 06:16 ·  中国 上海 上海地面通信息网络有限公司
初级用户
Credits 25
Posts 18
Joined 2008-09-10 21:40
17-year member
UID 125351
Gender Male
Status Offline
Which expert can give a detailed explanation of blat? I've tried for a long time without success.
Attachments
blat_2.6.1.rar (101.43 KiB, Downloads: 168)
Floor 7 Posted 2009-04-19 00:16 ·  中国 广东 广州 电信
初级用户
Credits 23
Posts 15
Joined 2008-03-26 19:44
18-year member
UID 114120
Gender Male
Status Offline
@echo off
:::::::::::::: Parameter Settings::::::::::::::
set from=xxx@163.com
set user=xxx
set pass=xxx
set to=xxx@qq.com
set subj=Test
set mail=mail_body.txt
set server=smtp.163.com
set debug=-debug -log blat.log -timestamp
::::::::::::::::: Run blat :::::::::::::::::
blat %mail% -to %to% -base64 -charset Gb2312 -subject %subj% -server %server% -f %from% -u %user% -pw %pass% %debug%

pause > nul & exit /b
Floor 8 Posted 2009-04-19 05:37 ·  中国 广东 东莞 电信
中级用户
★★
Credits 461
Posts 243
Joined 2007-10-14 16:56
18-year member
UID 99730
Gender Male
Status Offline
How to send an attachment of a specified compressed file with blat?
Floor 9 Posted 2009-04-19 10:57 ·  中国 四川 成都 电信
新手上路
Credits 9
Posts 7
Joined 2006-06-22 23:07
20-year member
UID 57425
Status Offline
I studied this tool some time ago for bulk email sending ^_^
1. Blat can use the install command to write password and other information to the registry when running for the first time, and then only call the corresponding profile to send later. When saved in the registry, it will be encrypted, at least there will be no problem of writing plaintext into the batch file

blat.exe /? | find "profile"
Blat -install <server addr> <sender's addr> ]]
Blat -profile
]]]]
: set server, sender, number of tries and port for profile
default profile can be specified with a '-'
-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


2. To send an attachment, you can use -attach to specify, and the other several options are all in the help

blat.exe /? | find "attach" | more
-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)
-af <file> : file containing list of binary file(s) to attach (comma
-atf <file> : file containing list of text file(s) to attach (comma
-aef <file> : file containing list of embed file(s) to attach (comma
: send multipart messages, breaking attachments on <size>


[ Last edited by Cappuccin0 on 2009-4-19 at 10:58 ]
Floor 10 Posted 2009-04-19 11:00 ·  中国 四川 成都 电信
新手上路
Credits 9
Posts 7
Joined 2006-06-22 23:07
20-year member
UID 57425
Status Offline
There is also a similar email batch processing tool called febootimail, which seems to be quite professional, but unfortunately, it is a paid one.
Forum Jump: