中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

中国DOS联盟论坛
现在时间是 2026-08-11 16:14
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [共享]强大命令行发邮件工具blat.exe 查看 3,952 回复 9
楼 主 [共享]强大命令行发邮件工具blat.exe 发表于 2007-11-30 17:28 ·  中国 浙江 温州 电信
中级用户
★★
积分 458
发帖 196
注册 2006-10-05 12:04
19年会员
UID 64614
状态 离线
运行一些监控脚本时,当出现一些问题用这个工具一句命令发邮件到tom邮箱

把tom邮箱的免费新邮件短信提示开通,出门也随时可以了解到电脑的情况:D:D

打算下边写个循环读取邮箱的脚本,让手机通过短信回复邮件来输入一些小命令控制电脑

blat网站:www.blat.net

使用方法

blat body.txt -to ***@tom.com -base64 -charset Gb2312 -subje
ct "警告" -server smtp.***.com -u user -pw password
2 发表于 2007-11-30 17:29 ·  中国 浙江 温州 电信
中级用户
★★
积分 458
发帖 196
注册 2006-10-05 12:04
19年会员
UID 64614
状态 离线
附件无法上传...
3 发表于 2007-12-01 15:46 ·  中国 甘肃 兰州 电信
金牌会员
★★★★
积分 4,103
发帖 1,744
注册 2006-01-20 13:00
20年会员
UID 49241
性别 男
来自 甘肃.临泽
状态 离线
让手机通过短信回复邮件来输入一些小命令控制电脑?

不太理解这段的意思,指点下
4 发表于 2007-12-01 20:18 ·  中国 北京 联通
银牌会员
★★★
积分 1,287
发帖 634
注册 2007-05-02 15:06
19年会员
UID 87277
性别 男
来自 cmd.exe
状态 离线
这种东西放BAT里有点太暴露了。。很容易email密码就丢了...
5 发表于 2009-01-21 13:07 ·  中国 湖北 武汉 电信
新手上路
积分 1
发帖 1
注册 2009-01-20 13:19
17年会员
UID 137094
性别 男
状态 离线
看到有的累了!
6 发表于 2009-04-16 06:16 ·  中国 上海 上海地面通信息网络有限公司
初级用户
积分 25
发帖 18
注册 2008-09-10 21:40
17年会员
UID 125351
性别 男
状态 离线
哪位大侠能详细解析一下blat,我try很久也没成功.
附件
blat_2.6.1.rar (101.43 KiB, 下载次数: 168)
7 发表于 2009-04-19 00:16 ·  中国 广东 广州 电信
初级用户
积分 23
发帖 15
注册 2008-03-26 19:44
18年会员
UID 114120
性别 男
状态 离线
@echo off
:::::::::::::: 参数设置::::::::::::::
set from=xxx@163.com
set user=xxx
set pass=xxx
set to=xxx@qq.com
set subj=测试
set mail=mail_body.txt
set server=smtp.163.com
set debug=-debug -log blat.log -timestamp
::::::::::::::::: 运行blat :::::::::::::::::
blat %mail% -to %to% -base64 -charset Gb2312 -subject %subj% -server %server% -f %from% -u %user% -pw %pass% %debug%

pause > nul & exit /b
8 发表于 2009-04-19 05:37 ·  中国 广东 东莞 电信
中级用户
★★
积分 461
发帖 243
注册 2007-10-14 16:56
18年会员
UID 99730
性别 男
状态 离线
blat怎样发指定的压缩文件附件呢??
9 发表于 2009-04-19 10:57 ·  中国 四川 成都 电信
新手上路
积分 9
发帖 7
注册 2006-06-22 23:07
20年会员
UID 57425
状态 离线
前段时间为了批量发邮件,正好研究过这个工具^_^
1. blat可以在第一次运行时用install命令将密码等信息写入注册表,以后只调用相应的profile就可以发送了。保存在注册表的时候会加密的,起码不会出现把明文写到批处理
里面的问题

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. 发送附件可以用-attach来指定,其他的几个选项在帮助里面都有

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 ]
10 发表于 2009-04-19 11:00 ·  中国 四川 成都 电信
新手上路
积分 9
发帖 7
注册 2006-06-22 23:07
20年会员
UID 57425
状态 离线
类似的邮件批处理工具还有一个febootimail,貌似做的挺专业的,不过可惜是收费的。
论坛跳转: