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 http://www.blat.net/

Install

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

blat -install smtp.server.co.uk admin@domain.com

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

Example

Here is an example of how to email a log file

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

The help file can be read here

No comments:

Post a Comment