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::Base
default :from => "[email protected]"
def send_message(name, email, message)
@name = name
@email = email
@message = message
mail(:to => '[email protected]',
:from => email,
:subject => "Message from the site",
:headers['X-SMTPAPI'] => "category: Drip Email"
)
end
end
Any help appreciated.
Thanks, Adam