Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mailer api config #34

Open
twmulloy opened this issue Mar 18, 2015 · 0 comments
Open

mailer api config #34

twmulloy opened this issue Mar 18, 2015 · 0 comments

Comments

@twmulloy
Copy link

the api_url should be constructed by a settings option, instead of hardcoded (v2). currently v3 is available.

https://github.com/jorgemanrubia/mailgun_rails/blob/master/lib/mailgun/client.rb#L22

Would prefer this:

    def api_url
      "https://api:#{api_key}@#{api_base_url}/#{domain}"
    end

To be set like this...

config.action_mailer.mailgun_settings = {
    api_key: ENV['MAILGUN_API_KEY'],
    domain: ENV['MAILGUN_DOMAIN'],
    api_base_url: ENV['MAILGUN_API_BASE_URL']
}

api_base_url is api.mailgun.net/v3

iainbeeston added a commit to iainbeeston/mailgun_rails that referenced this issue Apr 1, 2015
Right now the gem is hard-coded to use the v2 api, but v3 is out.
According to mailgun, v3 is backwards compatible except for the bounces
endpoint, which the gem does not use (details here -
http://blog.mailgun.com/default-api-version-now-v3/).

This changes the (hard-coded) endpoint url from v2 to v3. Possibly
solving jorgemanrubia#34.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant