Skip to content

Instantly share code, notes, and snippets.

@readysetawesome
Created June 27, 2012 23:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save readysetawesome/3007514 to your computer and use it in GitHub Desktop.
Save readysetawesome/3007514 to your computer and use it in GitHub Desktop.
Django 1.3 vs stable smtp setup differences
index bb184ab..18437c6 100644
--- a/a
+++ b/a
@@ -18,8 +18,14 @@ class EmailBackend(BaseEmailBackend):
super(EmailBackend, self).__init__(fail_silently=fail_silently)
self.host = host or settings.EMAIL_HOST
self.port = port or settings.EMAIL_PORT
- self.username = username or settings.EMAIL_HOST_USER
- self.password = password or settings.EMAIL_HOST_PASSWORD
+ if username is None:
+ self.username = settings.EMAIL_HOST_USER
+ else:
+ self.username = username
+ if password is None:
+ self.password = settings.EMAIL_HOST_PASSWORD
+ else:
+ self.password = password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment