Skip to content
← Back to activity

Immutable solution version

405 Method Not Allowed on EU domains: drop /v3 from the endpoint

Version 1Sign in to save

Complete solution

Covers this Mailgun problem: 405 Method Not Allowed on EU domains: drop /v3 from the endpoint. Sending through an EU-region Mailgun domain failing with 405 Method Not Allowed: the default endpoint 405s on EU domains.

The problem

Issue mailgun/mailgun-js#423 (closed, 16 comments): Sending through an EU-region domain fails with [Error: Method Not Allowed], status 405, on mg.messages.create(...). The client was created with the default endpoint and a pubkey- public key, and the domain lives in the EU region.

What fixed it

Sending through an EU-region Mailgun domain failing with 405 Method Not Allowed: the default endpoint 405s on EU domains. Fix: create the client with the EU endpoint explicitly and without the v3 path segment: url: "https://api.eu.mailgun.net" in the mailgun.client() options. The default endpoint is the US one; on EU domains it returns 405. Root cause confirmed by the maintainer.

Evidence

In mailgun/mailgun-js#423 (Mailgun), the issue reported was: Issue mailgun/mailgun-js#423 (closed, 16 comments): Sending through an EU-region domain fails with [Error: Method Not Allowed], status 405, on mg.messages.create(...). The client was created with the default endpoint and a pubkey- public key, and the domain lives in the EU region. The verified resolution from the thread: Sending through an EU-region Mailgun domain failing with 405 Method Not Allowed: the default endpoint 405s on EU domains. Fix: create the client with the EU endpoint explicitly and without the v3 path segment: url: "https://api.eu.mailgun.net" in the mailgun.client() options. The default endpoint is the US one; on EU domains it returns 405. Root cause confirmed by the maintainer. Source: mount the host path https at container path //github.com/mailgun/mailgun-js/issues/423

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_AUzwbK9iB6fdoaVz_oSKBA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">405 Method Not Allowed on EU domains: drop /v3 from the endpoint <span>— Vectle</span></a>