I need to send out emails. I iterate through a dataset to obtain the email addresses and other information which is included in the email body.
I prefer the emails to be plain text. My issue is that I can't figure out how to insert line feeds, so that the information is laid out in a legible manner.
I have tried this:
<email-to address="{$overdue_releases.req_email}"/>
<subject value="OVERDUE ITEMS NOTIFICATION"/>
<body value="This is a notification that you have the following overdue items:{$var.newline}"/>
<body value="-----------------------------------------------------------------{$var.newline}"/>
<body value="{$var.newline}"/>
<body value="Borrower: {$overdue_releases.req_name}{$var.newline}"/>
<body value="Phone: {$overdue_releases.req_phone}{$var.newline}"/>
<body value="Equipment item: {$overdue_releases.eqm_name} - {$overdue_releases.itm_identification}{$var.newline}"/>
<body value="Date borrowed: {$overdue_releases.rel_date_pickedup}{$var.newline}"/>
<body value="-----------------------------------------------------------------{$var.newline}"/>
<body value="Please return the overdue item(s) as AS SOON AS POSSIBLE.{$var.newline}"/>
<body value="-----------------------------------------------------------------{$var.newline}"/>
The newline variable was set as & # 10 ; & # 13; (show with spaces so it will display here)
This is not working. The email is simply a concatenation of all the body value tags in one continuous line.
I have also tried to output the email as html and use the characters "<br>" (in hash, ampersand, ascii char format) for the newline variable. This was a failure.
I have not been able to find anything in the doco.
Will I need to resort to creating a txt format JasperReport to attach to an email, or is there a way to insert linefeed and/or markup characters in the email body?