{"action":"opened","issue":{"url":"https://api.github.com/repos/anymail/django-anymail/issues/16","repository_url":"https://api.github.com/repos/anymail/django-anymail","labels_url":"https://api.github.com/repos/anymail/django-anymail/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/anymail/django-anymail/issues/16/comments","events_url":"https://api.github.com/repos/anymail/django-anymail/issues/16/events","html_url":"https://github.com/anymail/django-anymail/issues/16","id":155778993,"number":16,"title":"SSLError: bad handshake: SysCallError(104, 'ECONNRESET')","user":{"login":"cralston0","id":4924061,"avatar_url":"https://avatars.githubusercontent.com/u/4924061?v=3","gravatar_id":"","url":"https://api.github.com/users/cralston0","html_url":"https://github.com/cralston0","followers_url":"https://api.github.com/users/cralston0/followers","following_url":"https://api.github.com/users/cralston0/following{/other_user}","gists_url":"https://api.github.com/users/cralston0/gists{/gist_id}","starred_url":"https://api.github.com/users/cralston0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cralston0/subscriptions","organizations_url":"https://api.github.com/users/cralston0/orgs","repos_url":"https://api.github.com/users/cralston0/repos","events_url":"https://api.github.com/users/cralston0/events{/privacy}","received_events_url":"https://api.github.com/users/cralston0/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-19T16:24:01Z","updated_at":"2016-05-19T16:24:01Z","closed_at":null,"body":"It looks like Mailgun had a brief outage or maintenance this morning, which caused a flurry of exceptions to be thrown by requests as used by django-anymail.\r\n\r\nI'm honestly not sure if this is something django-anymail should catch and raise its own error, or if it should turn it into a warning and retry the send, or leave it as-is and put the burden on the django application.\r\n\r\nSlightly anonymized trace:\r\n\r\n          File \"my_code.py\", line 274, in scheduled_emails\r\n            email_msg.send()\r\n          File \"django/core/mail/message.py\", line 303, in send\r\n            return self.get_connection(fail_silently).send_messages([self])\r\n          File \"anymail/backends/base.py\", line 82, in send_messages\r\n            sent = self._send(message)\r\n          File \"anymail/backends/base_requests.py\", line 56, in _send\r\n            return super(AnymailRequestsBackend, self)._send(message)\r\n          File \"anymail/backends/base.py\", line 110, in _send\r\n            response = self.post_to_esp(payload, message)\r\n          File \"anymail/backends/base_requests.py\", line 68, in post_to_esp\r\n            response = self.session.request(**params)\r\n          File \"requests/sessions.py\", line 468, in request\r\n            resp = self.send(prep, **send_kwargs)\r\n          File \"requests/sessions.py\", line 576, in send\r\n            r = adapter.send(request, **kwargs)\r\n          File \"requests/adapters.py\", line 447, in send\r\n            raise SSLError(e, request=request)"}}