0

I have a simple batch-script, where at the end I want to send an automated e-mail by calling the function blat.exe:

blat.exe -body "Das ist ein Test von Admin" -s "ABCDEFGH" -attacht "\\server\C\applic\abcd\tool\output\datafile.txt" -f mail@adress.com -t mail@adress.com

I am getting the following error:

C:\C\applic\abcd\tool>blat.exe -body "Das ist ein Test von Admin" -s "ABCDEFGH" -attacht "\\server\C\applic\abcd\tool\output\datafile.txt" -f mail@adress.com -t mail@adress.com 
-body does not exist

I cannot figure out why it isn't working. Can anyone help here?

ste92
  • 434
  • 9
  • 23
  • 2
    Wait, I looked on [blat syntax documentation](https://www.blat.net/syntax/syntax.html) where it is written for first argument ``: if your message body is on the command line, use a hyphen (-) as your first argument, and -body followed by your message. So your command line clearly misses one `-` between `blat.exe` and `-body`. It is always useful to carefully read the documentation of an application to use. – Mofi Jul 23 '19 at 08:48
  • 1
    Follow @Mofi's hint about _a hyphen as your first argument_; take a look at [an example _Using Batch to call Blat_](https://www.blat.net/?faq/index.html#ex__using_batch_to_call_blat). – JosefZ Jul 23 '19 at 08:54

0 Answers0