Use blat to send email with attachments under the 1.3windows command line
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%