【发布时间】:2016-09-24 19:57:16
【问题描述】:
我刚刚写了一个凤凰邮件渲染器。当我通过应用程序发送电子邮件时,外部 css 不会被渲染,并且 mailer.html 布局也没有被拾取。
我在下面做错了吗?
def invitation_email(conn, to_email) do
html = View.render_to_string(MailerView, "invitation.html", layout: {LayoutView, "mailer.html"}, conn: conn)
send_email to: to_email,
from: "hi@#{conn.host}",
subject: "Invitation from #{conn.host}!",
html: html
end
【问题讨论】: