Fixing "hostname_check_failed" in Code::Stats

I was notified yesterday that email sending was failing in Code::Stats . The service uses Mailgun 's API via the Bamboo library for this functionality. Reproducing the issue locally, I got the following error: ** (Bamboo.ApiError) {:tls_alert, {:handshake_failure, ~c"TLS client: In state certify at ssl_handshake.erl:2186 generated CLIENT ALERT: Fatal - Handshake Failure {bad_cert,…