Comments (3)
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.
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.
Sounds good :) Going to close this, feel free to reopen if there is anything else.
from mandrill_mailer.
Related Issues (20)
- Template defaults overridden HOT 6
- Suggestion: Interceptor should accept return from proc HOT 2
- assets precompile error HOT 11
- Interceptor Proc params string symbol discrepancy HOT 1
- Delay throwing warning in test_setup_for blocks if email option is missing HOT 4
- vars do not serialize properly when using deliver_later HOT 2
- problem with template_content key in mandrill_mail(args) HOT 3
- dependent on json-1.8.3? HOT 4
- Optionally not encode attachments and images HOT 1
- Call render_to_string from MandrillMailer::TemplateMailer HOT 1
- Rails 5 support HOT 3
- Attachment not included in mail, yet no errors raised HOT 2
- Not working with rails 5 HOT 5
- Sending through array day as merge_vars HOT 1
- Optionally use 'mandrill_mailer/offline'
- Empty emails HOT 1
- Version 1.8.0 not available on RubyGems HOT 2
- Reject Error
- Unsigned error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mandrill_mailer.