Blat a Windows command line utility to send email with attachment.

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, 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 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 -f -s “How to send email using blat” -server

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.

About Andrew Lin

Hi, I have always wanted to creat a blog site but never had the time. I have been working in Information Technology for over 15 years. I specialize mainly in networks and server technologies and dabble a little with the programming aspects. Andrew Lin

View all posts by Andrew Lin →

4 Comments on “Blat a Windows command line utility to send email with attachment.”

Leave a Reply

Your email address will not be published. Required fields are marked *