Reputation: 1576
How can I add line breaks to a plain text email in Rails 4 without adding extra spacing?
For example:
Email template: email.text.erb
Thank you for contacting<%= "\r\n" %>
us today. We appreciate<%= "\r\n" %>
your business.
This is what the email looks like:
Thank you for contacting
us today. We appreciate
your business.
I want it to look like this (single spacing):
Thank you for contacting
us today. We appreciate
your business.
I've tried with and without the <%= "\r\n" %> entries but nothing works. Any help will be greatly appreciated.
Upvotes: 0
Views: 257
Reputation: 1576
I am using SendGrid to deliver emails. I just discovered that they have a setting to automatically convert text emails into html. When I turn this setting off in SendGrid, the formatting in email.text.erb appears in the email unchanged.
Upvotes: 2
Reputation: 1574
Try not to write <%= "\r\n" %>
, just
Thank you for contacting
us today. We appreciate
your business.
Upvotes: 0