I am having problems with the formatting of my email. This is what my code looks like
I am having problems with the formatting of my email. This is what my code looks like
----- email = NotifyMailer.create_send_notifications(@notification,@test) email.set_content_type("text/plain") NotifyMailer.deliver(email) -------
and my send_notifications.rhtml looks like this
----- <%=h @notification.message %>
Don't escape it. h is an alias for html_escape which (for 2.3.2) does this on the argument:
to_s.gsub(/[&"><]/) { |special| HTML_ESCAPE[special] }
To be quite precise, only use h (that is, html_escape) if the output is html. While your template is a .rhtml, you are telling mail clients that you are sending plain text.
Fred
Frederick Cheung wrote: