Blat is a free tool that allows you to send emails from the command line or from a batch file. Of course, you can also use it with any scripting language that allows you to launch external commands. This can be useful, if you want to be informed when a script has failed or when it finished its job.
- Poll: How reliable are ChatGPT and Bing Chat? - Tue, May 23 2023
- Pip install Boto3 - Thu, Mar 24 2022
- Install Boto3 (AWS SDK for Python) in Visual Studio Code (VS Code) on Windows - Wed, Feb 23 2022
Blat doesn't have to be installed, although it is possible to do so. However, this will only store a couple of settings to the Windows Registry such as the SMTP server or the number of times Blat will try to send an email. But you can also specify these settings in environment variables or as command options.
This is a simple example, which I just copied from the documentation of Blat:
@echo off
:::::::::::::: Lets set some variables ::::::::::::::
set eMail=tim@blat.tld
set subj=-s "Test Blat"
set server=-server localhost
set x=-x "X-Header-Test: Can Blat do it? Yes it Can!"
set debug=-debug -log blat.log -timestamp
::::::::::::::::: Now we run Blat! :::::::::::::::::
blat %0 -to %eMail% -f %eMail% %subj% %server% %debug% %x%
Read the latest IT news and community updates!
Join our IT community and read articles without ads!
Do you want to write for 4sysops? We are looking for new authors.
Great tool indeed, I just wish the current environment I work in would allow SMTP servers.
Be sure to also check out BMail (Freeware).
http://beyondlogic.org/consulting/cmdlinemail/cmdlinemail.htm
While I have never personally had the need, bmail also comes with mpack that allows you to package mime attachments for bmail sending… all possible from a command-line/batch script
Some other potentially handy apps can be found site.
Cypherbit, no SMTP servers around? You are working for the NSA or what? 😉
Wboy, BMail looks great too. Thanks! I think Blat supports attachments too.
I much more like the cross-platform (and completely free) SendEmail. Did I mention it’s written in Perl and there’s an EXE for windows platforms?
http://caspian.dotconf.net/menu/Software/SendEmail/