4

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'.
Mike Roosa
  • 4,752
  • 11
  • 40
  • 52

3 Answers3

3

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

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'
Patrick Cuff
  • 28,540
  • 12
  • 67
  • 94
3

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

-body 1st line|second line|third line
Keng
  • 52,011
  • 32
  • 81
  • 111
1

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 HTML file as an email body (remember to change PlaintextOnly=no in such a case).

Admin
  • 29
  • 1