相关代码:
msg = "Subject: Reset password instructions\n\nHello " + @request_payload["email"] + "!\n\n" +
"A new account has been created for you at <a href=\"presentation-layer.dev\">presentation-layer.dev<a>." +
"Please go to that page and click \"forgot password\" to set your password."
smtp = Net::SMTP.new 'smtp.gmail.com', 587
smtp.enable_starttls
smtp.start('domain', "email", 'password', :login) do
smtp.send_message(msg, 'sender', "recip")
end
生成的电子邮件中只有原始文本。如何让服务器评估 HTML 标签?