Code Monkey home page Code Monkey logo

Comments (7)

crjackso avatar crjackso commented on August 11, 2024 1

Hello, your hunch about omitting the subject from the mandrill_mail call was good. By simply omitting the subject, the default template subject was picked up. I thought I remembered reading in the README that the subject was required. Thanks for the gem!

from mandrill_mailer.

renz45 avatar renz45 commented on August 11, 2024

There isn't a way currently. We don't ever ask mandrill for any information about the template you use, it just uses the template name when it makes the api call to send the email.

from mandrill_mailer.

crjackso avatar crjackso commented on August 11, 2024

I have the same question. Does anyone have some tips on how I can get this working without mandrill_mailer's standard functionality? Thanks!

from mandrill_mailer.

renz45 avatar renz45 commented on August 11, 2024

I'm guessing that using the template's subject means using the Template's default template from the default options?

This gem uses the send-template call from the mandrill messages api. There doesn't appear to be an option for using the template subject. It's been awhile since I've done anything new with Mandrill. When I first made this, there were no template defaults so it never came up.

At a guess, I would think that if you didn't include a subject, that Mandrill would use the default that was set. I would try not setting the subject or passing nil and see if that works. Other then that, I'm not sure what triggers the default to be used. There is a possibility that the subject attribute has to be completely removed from the api call if the subject doesn't exist. If this is the case I can do that fairly easily, but I don't have time right now to experiment undocumented functionality with their api. :( If you want to make your own api calls and see how to trigger the default I can probably find some time next week to make it work.

from mandrill_mailer.

hllewelyn avatar hllewelyn commented on August 11, 2024

I've made the docs clearer, and as this actually does work I'm going to close this issue. ❤️

from mandrill_mailer.

renz45 avatar renz45 commented on August 11, 2024

Great! Thanks for testing that out. :)

from mandrill_mailer.

funwhilelost avatar funwhilelost commented on August 11, 2024

I actually had some issues getting this to work by omitting the parameter. I was able to make it work by supplying subject: nil as a parameter.

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.