Giter Club home page Giter Club logo

Comments (9)

Mange avatar Mange commented on August 26, 2024

Seems kinda lame. I'll take a look at it.

I think it's due to the gem trying its best to strip Roadie options from the headers. How do you add the headers so I can write a test for it?

from roadie.

nicholassm avatar nicholassm commented on August 26, 2024

I simply do the following (I've also tried to add it to the hash of the mail method):

def send_email(subscribers)
subscribers = [subscribers] unless subscribers.is_a?(Array)

# Set recipients with SendGrid SMTP API
# http://wiki.sendgrid.com/doku.php?id=smtp_api
headers["X-SMTPAPI"] = {
  :to => subscribers.map(&:email)
}.to_json

mail(:to         => "[email protected]", # ignored by SendGrid (errors will be sent here).
     :subject    => "Newsletter"  )

end

from roadie.

Mange avatar Mange commented on August 26, 2024

This is now confirmed and I have a working test for it.

For the record, saying headers["..."] = ... does not work since it only assigns to a local variable. What you meant to write is headers("..." => ...).

from roadie.

Mange avatar Mange commented on August 26, 2024

Could you test the version in master right now and see how it works? If it works for you I'll release this as version 1.0.0.

from roadie.

nicholassm avatar nicholassm commented on August 26, 2024

Sorry for not getting back to you before now - I have a major release (go live) on Thursday so I won't have time to integrate/test Roadie before the weekend. But thanks in advance for fixing the issues!

Regards,
Nicholas

from roadie.

Mange avatar Mange commented on August 26, 2024

Alright.

If you need to manually patch it before release, take a peek at the commit that fixed this problem: 7ed0d50

from roadie.

nicholassm avatar nicholassm commented on August 26, 2024

Hey, sorry for the late reply - we had a lot of post deployment stuff so it took a while before I could take another look at Roadie. It seems to work fine now - thanks!

from roadie.

Mange avatar Mange commented on August 26, 2024

Glad to hear it. I'll release this in a bit.

from roadie.

Mange avatar Mange commented on August 26, 2024

FYI: I've released 1.0.0 now.

from roadie.

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.