Merge pull request #174 from Jenselme/smptAuth

Correct auth without password or username.
This commit is contained in:
Martin Zimmermann 2015-03-07 22:34:04 +01:00
commit a2bda63bf0

View File

@ -72,7 +72,7 @@ class SMTP(object):
username = self.conf.get('username')
password = self.conf.get('password')
if username is not None and password is not None:
if username and password:
if PY2K:
username = username.encode('ascii')
password = password.encode('ascii')