Code Monkey home page Code Monkey logo

Comments (3)

renz45 avatar renz45 commented on August 11, 2024

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.

from mandrill_mailer.

pbstriker38 avatar pbstriker38 commented on August 11, 2024

ok. I guess I'll just have to do something like this:

mandrill = Mandrill::API.new(ENV.fetch('MANDRILL_API_KEY'))

mail(to: '[email protected]', 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

from mandrill_mailer.

renz45 avatar renz45 commented on August 11, 2024

Sounds good :) Going to close this, feel free to reopen if there is anything else.

from mandrill_mailer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.