Blat is a simple command line utility which sends email via SMTP.
Why? For regular messaging it's plainly easier to use your standard email client. But what Blat allows you to do is send emails from scripts and batch files, so you can have messages sent automatically as an alert for whatever situation you like.
First you must set up Blat, though. Launching the program from the command line will display the various switches and settings you'll need to apply, but a minimal setup will look something like this:
(Replace the first "[email protected]" with your sending address, "mail.domain.com" with your SMTP server, the second "[email protected]" with your user name, and "password" with, well, your password.)
With that done you can then probably send an email like this:
Blat filename.txt -to [email protected]
Where "filename.txt" is a text file containing whatever you'd like to send (it transmits the contents of the file rather than sending it as an attachment, so it must be plain text), and [email protected] is the email address where you're sending the message.
But if you need more flexibility then there are additional switches you can use, for example specifying the port to use for transmission. And you can optionally add extra switches to the sending line, so for instance you can have different scripts send messages via different servers and email accounts. Enter Blat at the command line to see the full syntax.
[+] Added -logcmds option to write the command line arguments to the log, or to the screen, when also using -log option.
[*] RFC 6152 spells out that SMTP clients and servers must use "8BITMIME" when support for 8-bit octects is requested and/or supported. However, some SMTP software is responding with "250-8 BITMIME" instead, with an embedded space in violation of RFC 6152. "8 BITMIME" is now accepted as if it were "8BITMIME".
[-] If UTF-8 is selected with -charset option, and neither 8BITMIME nor BINARYMIME are not supported by the server, then UTF-7 will be used instead.