我正在尝试创建一个自定义电子邮件标头以使用 SendGrid api。
这就是我正在做的事情 - 但它不起作用:
class Mailman < ActionMailer::Base
default :from => "info@sample.com"
def send_message(name, email, message)
@name = name
@email = email
@message = message
mail(:to => 'info@sample.com',
:from => email,
:subject => "Message from the site",
:headers['X-SMTPAPI'] => "category: Drip Email"
)
end
end
任何帮助表示赞赏。
谢谢,亚当