Include line breaks in email sent via batch file

0

"\\File\Path\To\Program.EXE" AUTORUN="report" /SYS OUTPUT= MAPI (TO="bob@email.com.au" SUBJECT="Report" MESSAGE="Hi, Please find attached your statement. Regards, Bob." STYLE=PDF)

The above batch file runs a program which generates a report, then emails the report as an attachment. This all works however when sending the email their are no line breaks in the body of the email message.

How do I add in line breaks so the message reads as below?

Hi,

Please find attached your statement.

Regards, Bob

Ashley

Posted 2019-05-03T21:42:05.910

Reputation: 1

Which mail server/software? – music2myear – 2019-05-03T21:45:32.130

3Insert a line break in mailto body – JosefZ – 2019-05-03T21:48:36.850

In what format is the message sent, eg plain text, HTML, Rich Text? – I say Reinstate Monica – 2019-05-03T21:54:07.640

Answers

3

You give no information about the program that is actually sending the email. So I can only give you a couple of general options. One of them might do the trick:

  • Put "< p >" (without the quotes) were you want a line-break.
  • Try "< br >" (without the quotes)
  • Try "\n" (again: without the quotes).
  • Some programs allow the body of the mail to be read from a file in stead of a command-line parameter. So check the documentation if that can be used.

Tonny

Posted 2019-05-03T21:42:05.910

Reputation: 19 919