Closed pbstriker38 closed 7 years ago
Sadly this is just a wrapper for the mandrill API gem that makes it work like other Rails mailers. It's still using the Mandrill API for template emails. I'm not sure how fetching templates would work since variables are sent in to be inserted into the template before it's sent.
ok. I guess I'll just have to do something like this:
mandrill = Mandrill::API.new(ENV.fetch('MANDRILL_API_KEY'))
mail(to: 'email@service.com', subject: 'subject') do |format|
format.text { strip_tags(mandrill.templates.render('simple_test', [], [{name: 'FIRST_NAME', content: 'Daniel'}])["html"]) }
format.html { mandrill.templates.render('simple_test', [], [{name: 'FIRST_NAME', content: 'Daniel'}])["html"] }
end
Sounds good :) Going to close this, feel free to reopen if there is anything else.
Is it possible to use Amazon SES as the sender of emails and just grab templates from Mandrill?
Amazon ses is set up in my production.rb like so:
config.action_mailer.delivery_method = :aws_sdk