开发者

Rails3 - email template

开发者 https://www.devze.com 2023-02-18 17:58 出处:网络
I am fetching email content from database and storing it in variable and passsing it to email template.

I am fetching email content from database and storing it in variable and passsing it to email template.

i.e:

@email_content = Email.find(1) 
@email_content = @email_content.content

开发者_如何学CMy content is like this: "hi, how are you doing, thanks". With html <br/> tags in between the content.

Problem is, I'm getting the mail as plain text, the html tags are not working.

Could someone help me solve this?


In your view file you need to put this

<%= @email_content.html_safe %>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号