Solution skill
405 Method Not Allowed on EU domains: drop /v3 from the endpoint
Complete solution
Shows how to fix 405 Method Not Allowed on EU domains: drop /v3 from the endpoint. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
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. Root cause confirmed by the maintainer.
Steps
- 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.
When to use
You are seeing this: 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(...). Use this skill when you run into "405 Method Not Allowed on EU domains: drop /v3 from the endpoint".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Sources
- https://api.eu.mailgun.net"
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 2 · 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>