1

Can you please help me on a BLAT issue ? I have a batch file where I use BLAT utility to send emails using SMTP server. When I run same batch file from a dos shell manually, the email is sent properly. But when I schedule the batch file to run from Windows task scheduler, the BLAT doesn't send any email.

I am using Windows 7 and the BLAT version is:

Blat v3.2.19 (build : Nov 18 2017 03:14:35)
32-bit Windows, Full, Unicode
Jamil Rahman
  • 345
  • 1
  • 6
  • 18

2 Answers2

0

This is an old question but if anyone else runs into this try adding,

-f <sender email addy> -server <server addr> [-port <port>]

to the blat commandline. Task scheduler likely can't find the profile as admin that you installed when you where logged in as you.

MikeJRamsey56
  • 2,779
  • 1
  • 20
  • 34
0

I realize this is an old question, but I have something to add that may help others save time and reduce frustration.

When blat.exe is run in a batch file from the command prompt, it uses the context of the current .bat location. When run from Task Scheduler is does not.

2 Solutions:

  1. Use full path in the .bat being called i.e. D:\dir1\dir2\blat.exe and do same for all files referenced in the .bat for blat such as recipients file, log file, etc.
  2. If you would like to use relative paths you can configure the Task Scheduler "Start in" in Edit Action to D:\dir1\dir2\

Output to a log file to see error codes or missing or invalid parameters etc.

Tested both ways and it works whereas it did not before.

Umutambyi Gad
  • 4,082
  • 3
  • 18
  • 39