jorgemanrubia / mailgun_rails

Rails Action Mailer adapter for Mailgun
MIT License
210 stars 70 forks source link

sending bulk email with singular to recipient #62

Closed tyrauber closed 8 years ago

tyrauber commented 8 years ago

I am trying to send bulk emails through mailgun using this gem, following the example here. While the recipient_variables are present and are inserted into the page content, the to field lists all recipients, which isn't my desired or expected behavior.

I tried sending an email with out mail to and only setting the recipient_variables, but I recieve the error:

NoMethodError: undefined methodformatted' for nil:NilClass mailgun_rails-0.8.0/lib/mailgun/deliverer.rb:48:in build_basic_mailgun_message_for

Any suggestion for sending bulk email with a singular to recipient?

tyrauber commented 8 years ago

Disregard. I had created an ActiveMailer Interceptor to set the mailgun_reciepient_variables and the class wasn't getting loaded in production. As long as mailgun_reciepient_variables is present, mailgun will overwrite the to attribute.