

Send an e-mail from a script in batches. Blat does not work
source link: https://www.codesd.com/item/send-an-e-mail-from-a-script-in-batches-blat-does-not-work.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Send an e-mail from a script in batches. Blat does not work
I need to send an email from a batch script. I tried several solutions without success.
For example, with Blat:
:send_mail
"\Program Files (x86)\blat275\full\blat.exe"
-server smtp.gmail.com
-port 525
-f [email protected]
-to [email protected]
-s "hello"
-body "world"
When I run the script, I just get a Windows crash:

Does someone have a better solution?
EDIT & SOLUTION
I tried on our server (with our smtp) and it worked with Blat. See the full code in my answer below.
Realize this is old, but for any googlers:
Blat will NOT work with gmail, as it requires an SSL connection to be accessed over SMTP, which blat doesn't (as of 06/02/2013) support
See here: http://www.jeffkastner.com/2010/01/blat-stunnel-and-gmail/ for a (slightly messy) workaround.
Related Articles
injecting javascript into cshtml from a partial view using RenderSection does not work
C # send & amp; Receive messages via NetworkStream & mdash; Simple code, but does not work as expected
Open the Android app from the URL using intention-filter does not work
why my script in the unit does not work
The html e-mail sent from the text Outlook-align left does not work in gmail IE
script bash with kdialog does not work from cron
Simple connection script - connection to encryption does not work when connecting
Sending the variable as an argument using the escape character does not work
The minified script with the grouping does not work in ASP.NET MVC 3 when debugging is disabled
Converting the date from the string to the date does not work with dateFormatter and Swift
validation script for radio button does not work
script installed under crontab does not work
When, when sending an e-mail of 19mb zip file size, it does not emit e-mail?
The simple script executed via cronjob does not work but runs from a shell
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK