I'm sending a plain text email and was wondering how I add a line break to this. It's showing up on on the same line.
From: <%= @name %>
<%= @text %>
Thanks
I'm sending a plain text email and was wondering how I add a line break to this. It's showing up on on the same line.
From: <%= @name %>
<%= @text %>
Thanks
<%= "\r\n" %>
In double quotes and inside '<% %>'.
Otherwise it's considered as simple text.
\r\n
or if you're sending html email:
<br />
so:
From: <%= @name %> \r\n <%= @text %>
From: <%= @name %> <br /> <%= @text %>
I could be completely wrong, but isn't it a simple \n ?
If your template is in HAML, some_template.text.haml, you can use the \ char:
= t(".salutation_start", name: name)
\
= t(".paragraph.text")
\
\
= t('.salutation_end')
\
= t('.contacts')