From 71292aa223387707f58f9b0276386deb4c999205 Mon Sep 17 00:00:00 2001 From: Theo Crevon Date: Tue, 30 Oct 2012 17:21:46 +0100 Subject: [PATCH] Update : new sender validation endpoint and process --- djrill/mail/backends/djrill.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/djrill/mail/backends/djrill.py b/djrill/mail/backends/djrill.py index 6c9e3a8..70cb6ab 100644 --- a/djrill/mail/backends/djrill.py +++ b/djrill/mail/backends/djrill.py @@ -29,7 +29,7 @@ class DjrillBackend(BaseEmailBackend): "url to your settings.py") self.api_action = self.api_url + "/messages/send.json" - self.api_verify = self.api_url + "/users/verify-sender.json" + self.api_verify = self.api_url + "/users/ping.json" def open(self, sender): """ @@ -37,11 +37,9 @@ class DjrillBackend(BaseEmailBackend): self.connection = None valid_sender = requests.post( - self.api_verify, data={"key": self.api_key, "email": sender}) + self.api_verify, data={"key": self.api_key}) if valid_sender.status_code == 200: - data = json.loads(valid_sender.content) - if data["is_enabled"]: self.connection = True return True else: