At the moment i am using blat like this:
ECHO %date:~0%-%time:~0,8% - ERROR: %ERRORTEXT% | "./Plugins/blat.exe" -server smtprelay.XXX.de -f "XXX" -subject %SUBJECT% -to %SENDTO% >>./logs/%date:~0%.log
But i the text to send is very long and would need to be formated. Is it possible to make a linebreak like \n or something and give this to blat with the pipe?
At the moment, Blat does not convert \n in text to a carriage return / line feed. By using the ECHO command in batch files, if you echo your text to a text file, with one echo command per line of intended output, the text file will automatically have carriage returns.
I might change your line to look more like these lines:
ECHO %datestamp%-%timestamp% - ERROR: %ERRORTEXT% > ./logs/%datestamp%.txt
ECHO line 2>> ./logs/%datestamp%.txt
"./Plugins/blat.exe" ./logs/%datestamp%.txt -server smtprelay.XXX.de -f "XXX" -subject %SUBJECT% -to %SENDTO% -log ./logs/%date:~0%.log
del ./logs/%datestamp%.txt > nul
Hi chipprogrammer, thanks for your fast replay :)
Is it planed to included this feature for future releases of blat? The idea of an extra file for email sending is something that doesnt feels right ;) But i will try your suggestion, thank you very much!