【发布时间】:2011-05-12 14:09:38
【问题描述】:
我正在寻找一种在 mail_to 链接中包含 html 的方法,以便我可以在此电子邮件的正文中自动包含横幅。
感谢任何提示
马库斯
【问题讨论】:
标签: html ruby-on-rails email mailto
我正在寻找一种在 mail_to 链接中包含 html 的方法,以便我可以在此电子邮件的正文中自动包含横幅。
感谢任何提示
马库斯
【问题讨论】:
标签: html ruby-on-rails email mailto
轨道 3
mail_to "email@example.com", raw(image_tag("/path/to/banner.png"))
Rails 2.x
mail_to "email@example.com", image_tag("/path/to/banner.png")
请参阅mail_to 帮助程序的文档。
【讨论】:
在带有actionview-encode_mail_to 的rails 4 中,您可以像(Haml 语法)一样进行操作:
= mail_to 'email@example.com', encode: 'javascript' do
= image_tag('contact_email.png')
【讨论】: