Get the App
SLTechnology News&Howtos  ›  Servers  › 

Use blat to send email with attachments under the 1.3windows command line

Shulou Source: shulou.com Published: 2022-06-03 07:12:33 11月16日 Update

The blat program that applies the windows command line bat batch script sends mail automatically

Use blat to send email with attachments under the 1.3windows command line

_ _ Flag, introduce Mo (Sun Zhong)

Send email script template

Rem-email content-

Set body= "test mail"

Rem-the subject of the email-

Set s = "Test test"

Rem-pick-up mailbox

Set t=nn1183@qq.com

Rem-sending mailbox-

Set f=442624872@qq.com

Rem-mailbox key-

Set pw=hacrtlypjdracada

Rem-execute send-

Blat-body% body%-s% s%-t% t%-server smtp.qq.com-f% f%-u% f%-pw% pw%

Https://blog.51cto.com/mflag/2283256

Optimization plus attachments

-attach

Rem-email content-

Set body= "test mail"

Rem-the subject of the email-

Set s = "Test test"

Rem-pick-up mailbox

Set t=nn1183@qq.com

Rem-sending mailbox-

Set f=442624872@qq.com

Rem-mailbox key-

Set pw=hacrtlypjdracada

Rem-Annex-

Set attach= "1.txt 1.7z"

Rem-execute send-

Blat-body% body%-s% s%-attach% attach%-t% t%-server smtp.qq.com-f% f%-u% f%-pw% pw%

Optimize the contents of the file to get from the file

Blat-to [optional switches (see below)]

Rem-email content-

Set body= "1.txt"

Rem-the subject of the email-

Set s = "Test test"

Rem-pick-up mailbox

Set t=nn1183@qq.com

Rem-Annex-

Set attach= "1.txt"

Rem-sending mailbox-

Set f=442624872@qq.com

Rem-mailbox key-

Set pw=hacrtlypjdracada

Rem-execute send-

Blat% body%-s% s%-attach% attach%-t% t%-server smtp.qq.com-f% f%-u% f%-pw% pw%

Tags: Mail mailbox attachment content subject test command file script template program application Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker MariaDB Huawei Microsoft Redmi