How to create custom email headers

前端 未结 4 748
南笙
南笙 2021-02-02 10:03

I\'m trying to create a custom email header to use the SendGrid api.

Here\'s what I\'m doing - but its not working:

class Mailman < ActionMailer::Ba         


        
4条回答
  •  忘掉有多难
    2021-02-02 10:47

    The headers method requires valid JSON. So Ricardo's solution requires this line instead:

    headers['X-SMTPAPI'] = '{"category": "Drip Email"}'

提交回复
热议问题