我使用\n
,他们都显示为字面\n
如何在Ruby电子邮件中发送换行符?
class TestMailer < ActionMailer::Base
def simple_mail(to, subject, body)
mail(:to => to, :subject => subject, :body => body)
end
end
TestMailer.simple_mail('[email protected]', 'subject', 'hi\n there').deliver
我看到在我的收件箱字面\n
。
我得到\纳秒,当我回复短信,然后转发该消息到另一个帐户。 – quantumpotato 2013-05-12 16:14:51