我正在寻找一种在 mail_to 链接中包含 html 的方法,以便我可以在这封电子邮件的正文中自动包含横幅。
感谢您的任何提示
马库斯
我正在寻找一种在 mail_to 链接中包含 html 的方法,以便我可以在这封电子邮件的正文中自动包含横幅。
感谢您的任何提示
马库斯
导轨 3
mail_to "email@example.com", raw(image_tag("/path/to/banner.png"))
导轨 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')