我正在使用\n
,它们显示为文字\n
class TestMailer < ActionMailer::Base
def simple_mail(to, subject, body)
mail(:to => to, :subject => subject, :body => body)
end
end
TestMailer.simple_mail('my@email.com', 'subject', 'hi\n there').deliver
我在收件箱中看到了文字\n
。