From 3afde36d03e2b3b5ff5a265af39d8fb27afa8959 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Fri, 25 Oct 2013 11:19:41 +0200 Subject: Undelete the login() call inadvertantly removed in 4e0a2fe59c Refs #21271. --- django/core/mail/backends/smtp.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'django') diff --git a/django/core/mail/backends/smtp.py b/django/core/mail/backends/smtp.py index df47d4e823..c9e0a18728 100644 --- a/django/core/mail/backends/smtp.py +++ b/django/core/mail/backends/smtp.py @@ -56,6 +56,8 @@ class EmailBackend(BaseEmailBackend): self.connection.ehlo() self.connection.starttls() self.connection.ehlo() + if self.username and self.password: + self.connection.login(self.username, self.password) except smtplib.SMTPException: if not self.fail_silently: raise -- cgit v1.3