lib/railgun/mailer.rb in mailgun-ruby-1.2.0 vs lib/railgun/mailer.rb in mailgun-ruby-1.2.3
- old
+ new
@@ -30,10 +30,12 @@
@mg_client = Mailgun::Client.new(
config[:api_key],
config[:api_host] || 'api.mailgun.net',
config[:api_version] || 'v3',
config[:api_ssl].nil? ? true : config[:api_ssl],
+ false,
+ config[:timeout],
)
@domain = @config[:domain]
# To avoid exception in mail gem v2.6
@settings = { return_response: true }
@@ -81,10 +83,10 @@
message["v:#{k}"] = JSON.dump(v)
end
# o:* attributes (options)
mail.mailgun_options.try(:each) do |k, v|
- message["o:#{k}"] = v
+ message["o:#{k}"] = v.dup
end
# support for using ActionMailer's `headers()` inside of the mailer
# note: this will filter out parameters such as `from`, `to`, and so forth
# as they are accepted as POST parameters on the message endpoint.