Blat is a handy command line utility that sends email with attachment using SMTP. It can also be used to post to usenet using NNTP. It is not an SMTP server, you will need an SMTP server for Blat to send email.
Blat can be downloaded from blat.net, it is very wasy to use. You don’t even have to install it, although the install option does exist.
Here are the steps I tool to get Blat working on my Windows 2003 server.
Download Blat from blat.net and extract the files to any folder. In my case I put it in c:\tools\blat262. There are two subdirectories docs and full. Full is where the executable and dll are.
Below is the syntax to email a file from the command line.
c:\tools\blat262\full\blat c:\file\attchment.txt -to recipient@technology.com -f sender@email.com -s “How to send email using blat” -server smtp.server.com
Save the above command in a batch file and you can schedule it to run whenever. The content of the file attachment.txt is embedded in the body of the email, not an attchment.
4 comments for “Blat a Windows command line utility to send email with attachment.”