Something is blocking the connection. File a ticket with mailgun (with your host’s ip number) and perhaps with your hosting provider. Say that your can’t connect and that the connection times out.
Now that your have exposed your password you should change it (or maybe you did before sharing it).
If you get a solution, please let me know. It might help with my clients similarly mysterious problem.
Perhaps your host has been blacklisted. Find the ticket with mailgun, then search for blacklist checkers and see if your host is on one.