Question

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

Was it helpful?

Solution

\r\n

or if you're sending html email:

<br />

so:

From: <%= @name %> \r\n <%= @text %>
From: <%= @name %> <br /> <%= @text %>

OTHER TIPS

<%= "\r\n" %>

In double quotes and inside '<% %>'.

Otherwise it's considered as simple text.

I could be completely wrong, but isn't it a simple \n ?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top