Fixing anymail/mailgun "Domain not found" error.

Fixing anymail/mailgun "Domain not found" error.


Are you swearing at mailgun now? Have you smashed your keyboard already? Do you keep receiving the  Domain not found: domainname.com error although you're 100% sure you've set everything up correctly?

Yeah, I’ve been there and probably, I have a solution for you.

Chances are, your domain is set as EU in mailgun. Make sure you use correct API base URL in this case:  https://api.eu.mailgun.net/v3note the  eu part. Update example snippets that mailgun gave you with this endpoint and everything should start working just fine.

I’m on Django, and I use Anymail

Me too! Make sure you’ve added european mailgiun API URL to settings.py:

That should be it; now you’re happy european mailgun user! You’re welcome!

Hey, if you’ve found this useful, please share the post to help other folks find it: 

Previous Post Next Post

Contact Form