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
I am using below code and works fine, just convert the hash to json with to_json
to_json
headers['X-SMTPAPI'] = { category: "Weekly Newsletter", unique_args: { user_id: user.id } }.to_json