lib/railgun/mailer.rb in mailgun-ruby-1.2.12 vs lib/railgun/mailer.rb in mailgun-ruby-1.2.13

- old
+ new

@@ -47,12 +47,14 @@ end def deliver!(mail) @mg_domain = set_mg_domain(mail) @mg_client.set_api_key(mail[:api_key].value) if mail[:api_key].present? + @mg_client.set_subaccount(mail[:subaccount_id].value) if mail[:subaccount_id].present? mail[:domain] = nil if mail[:domain].present? mail[:api_key] = nil if mail[:api_key].present? + mail[:subaccount_id] = nil if mail[:subaccount_id].present? mg_message = Railgun.transform_for_mailgun(mail) response = @mg_client.send_message(@mg_domain, mg_message) if response.code == 200 then