Blat crashes when an email is sent – fixed.

I had an issue with blat yesterday with a new script I was working on. Every time I sent an email, it would crash and I would get “A Win32 command line eMail tool has stopped working.” As this was also running on a Windows2008 server this was also affecting the reliability index on the server – one of the things we check as part of our checkups.
I spent a good while trying to work out what was wrong, typed out the command to send mail and it worked – so I knew the issue was not blat itself. After calling over a colleague to help, demonstrating the (reproducible) problem of pasting the script line and crashing blat I asked what was wrong. The two of us still took a couple of minutes before he realised I had mistyped the server name used to send the mail. Instead of I had entered
Sure enough – if the mail server hostname can not be resolved by blat – it will crash. I was also able to reproduce this on my Windows7 machine at home too.

A simple fix but difficult to find after looking at code for a long time – getting someone else to look at your code often does wonders.


  1. Stuart Drabble

    Hi, I was just trying to figure out if Blat works on SBS 2008 (x64) and from this post I assume it does….? Thank you.

  2. Post
  3. sheel

    I had an issue with blat yesterday system trigger two different Blat Batch file at the same time. Once of batch file getting error “A Win32 command line eMail tool has encountered a problem and needs to close” and the batch working fine. As check the error report contains “Error Signature AppName: blat.exe AppVer: ModName: msvcrt.dll ModVer: 7.0.2600.5512 Offset:00036fa3. When i try to run batch it is working file. It looks very odd because both of the batch is similar the only different is attachment and recipient mail address.

    Previously I don’t have any issue with running the batch file at the same time. Does any one have any experience with the above issue?

  4. Post

    Hey Sheel – thanks for your post. I would carefully check the contents of the two batch files – it took me quite a while to realise that I had a typo in mine. Like you, I thought the attachment was wrong, but it turned out to be the servername. If you want, send me a screenshot of the batch running (make sure echo is on) and your batch files and I can take a look. (email sent with contact information)

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.