Introduction to Windows command line send mail Blat.exe
Download the latest kit and unzip and copy it to the System32 directory on the operating system disk. My environment is c:windowssystem32.
The confirmation file has been copied past:
Blat.dll
Blat.exe
Blat.lib
Batch Command Example:
-----------------Example Begins-----------------------------------------
@echo off
,:::::::: Parameters:::::----parameter settings
Set from=xxx@163.com
Set User=xxx
Set Pass=xxx
Set to=xxx@163.com
Set subj= test
Set Mail=mail_body.txt
Set server=smtp.163.com
Set Attach=attach.rar
Set Debug=-debug-log Blat.log-timestamp
::::::::-::::--£ blat::-----
rem Blat%mail%-to%to%-base64-charset gb2312-subject%subj%-server%server%-F%from%-u%user%-pw%pass%-attach% attach%%debug%
-----------------Example End-----------------------------------------
After testing, the Chinese content is not a problem (note the source file encoding), support 163 of such systems,
Mail_body.txt: Body
Attach.rar: Accessories