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.

Be Sociable, Share!

4 comments for “Blat a Windows command line utility to send email with attachment.

  1. anti product
    January 30, 2010 at 3:16 pm

    Just want to tell you that your blog is awsome, keep us posting :)

  2. wallmart
    October 20, 2009 at 1:28 pm

    There is nothing better than to go to your blog in the morning with a cup of coffee

  3. Henta
    October 10, 2009 at 7:50 pm

    ehh. interesting.

  4. lilikindsli
    October 4, 2009 at 3:57 pm

    BiWOKu I want to say – thank you for this!

Leave a Reply

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