If you’re using CloudFlare, and the API connection stops working, or is timing out, it may be due to CloudFlare’s browser check:

You’ll need to whitelist MageMail’s server IPs, in CloudFlare, which are [please login].
Instructions for this can be found here: CloudFlare’s website.