Problem Sending Emails with BLAT

Posted on 2011-10-11
Last Modified: 2013-11-30
Anyone familiar with the command line email program BLAT? We had it set up on our previous server (SBS 2003), and after installing it on the new one (2008), it refuses to work. I set it up with the following command:

blat -install exchange_server_name.united.local

Then, when I want to use the program, I call:

blat -body " body text” -s "subject" -to recipient  -from sender -attach “attachment”

This results in an error:
"The SMTP server does not like the sender name.
Have you set your mail address correctly?
Error: Connection to server was dropped."

I try -installing with any email address on our server, and this happens.
Question by:rvfowler2
    LVL 23

    Accepted Solution

    (NOTE:  The below isn't about SBS, I'm not familiar with how it changes things around, so take it for what it's worth)

    I'm not familiar with BLAT, but it appears you aren't sending any authentication, so you might need to setup a relay connector and allow that IP address to send to the connector in order for it to work.

    See here:

    That is just the receive connector so don't think of "relay" as a bad word here.

    You'll need to understand what you are doing though.  Best to create an additional IP address assigned to the Exchange server NIC, use that IP for the relay receive connector's "use these local IP addresses to receive mail".  Then in "Receive email from remote servers that have these IP addresses" put in the hosts IP addresses (like the BLAT server you are running this BLAT command on) there.

    Hope that helps.  If you need further assistance let me know.
    LVL 1

    Expert Comment

    This works on my 2008R2 server:

    blat -body " body text”  -server SMTPmailservername -f sender  -to recipient -attach “attachment”
    and make sure that unauthenticated SMTP is allowed to your SMTP relay (if you have one)

    if you do not have SMTP relay server set-up then this will work (will not work on an exchange server): blat -body " body text”  -server SMTPmailservername -f sender  -to recipient -attach “attachment”

    I found a 64-bit version of Blat that someone had tweaked a few months back but cannot locate it now. If all else fails, try to download a 64-bit version.

    to test, cd to the folder with blat, create a test file with some content and do this:
    type  | blat.exe ./test_text_file.txt -server SMTP_server -f from_address -to to_address -s "Subject Text here"
    LVL 2

    Author Closing Comment

    As it turns out, you indirectly led me to the solution. After more research, I found that BLAT actually has parameters for authentication, so I used that method successfully.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Learn more about how the humble email signature can be used as more than just an electronic business card. When used correctly, a signature can easily be tailored for different purposes by different departments within an organization.
    New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
    This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
    In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now