How to send email from command line using blat when body contains carriage return and line channels?

I have a Windows server that sends me letters through the BASIC program. If the message body contains carriage / line returns, then the message does not end. Only the first line is sent to me. I tried replacing them \ n, but this did not help, as the letter came to me with \ n in it. Any ideas?

Here is the command I'm using:

blat -to mike.roosa@toltsg.com -subject "[DEV] PO Detail Report" -body "Attached file is ready for import. From 01/01/09 to 01/29/09 PO Status not egual to 'C'" -attach "C:\TXT\PODetail_26879.csv" -log C:\EMAIL.LOG\20090129.TXT -timestamp'. 
+4
source share
3 answers

If you want to do all this, use '|' symbol

 -body 1st line|second line|third line 
+3
source

You can put the body in a text file and send blat:

 blat [text file here] -to mike.roosa@toltsg.com -subject "[DEV] PO Detail Report" -attach "C:\TXT\PODetail_26879.csv" -log C:\EMAIL.LOG\20090129.TXT -timestamp' 
+3
source

Just use Mail Alert Simple Mailer: https://sourceforge.net/projects/mail-alert/

MailAlert.exe -r address@example.com -b "@Your_Directory \ File_with_Mail_Body.txt"

You can also attach the HTML file as an email body (remember to change PlaintextOnly = no in this case).

0
source

All Articles