Mailgun eu api not working

Hi @virk,

mailgun adapter is working great, but there is a problem if you are going to use eu domain based mailgun.

Inside Mailgun adapter (line 51), endpoint is hardcoded:

  get endpoint () {
    return `https://api.mailgun.net/v3/${this.config.domain}/messages.mime`
  }

If you are using eu domain… Endpoint should be: api.eu.mailgun.net

What is the best way to change this? I tried extending this adapter, but not sure how to register it… It would be great if we could specify which api we use inside mail config…

I’m talking about mailgun mail adapter… This is not connected with routing in any way.

Can you create a PR for same. This is how it should work (roughly)

  1. Optionally define region in config file.
  2. If region exists, prefix it inside the URL, otherwise ignore it

Added PR, then saw that there is already one from February, but without tests

Thank you.
AdonisJs = Tests