windowsemailsmtpblat

How can I send an email from the command line using blat when the body contains carriage returns and line feeds?


I have a windows server which sends emails to me through a BASIC program. If the message body contains carriage returns/line feeds then the email never finishes. Only the first line is sent to me. I tried replacing them with \n but that didn't help as the email came to me with the \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'.

Solution

  • If you want to do it all inline use the '|' character

    -body 1st line|second line|third line