Search This Blog

Monday, 7 April 2014

How to send an email via the command line

Download BLAT

The tool for emailing from the command line is the Open Source application BLAT. You can download that here


Copy the Blat.exe file to the C:\Windows\System32 folder and then run the application as

blat -install

Where you enter your SMTP Smart Host and the email you want the messages to come from


Here is an example of how to email a log file

blat -attacht "C:\FTPLog\Transfer.log" -to -subject "Export Log" -body "This is the log file of the Export"

The help file can be read here

No comments:

Post a Comment