如何在动作邮件中将引用标题添加到电子邮件中?

时间:2013-03-26 09:09:19

标签: ruby-on-rails ruby actionmailer

我尝试使用标题

添加它
headers "References" => "<message_id>"

但是在生成的电子邮件中找不到它。此外,我试图添加In-Reply-To标头,它也不会出现。我正在使用rails 2.3.8。

1 个答案:

答案 0 :(得分:0)

试试这个。

class UserMailer < ActionMailer::Base

  def notification(user)
    recipients    user.email
    from          "notifications@example.com"
    headers       {"References" => "<message_id>"}
    # code ...
  end
end

查看文档here in guides for Rails,了解如何指定标题的语法。