Skip to content

Commit

Permalink
fix smtp hmac doesn't like unicode password string
Browse files Browse the repository at this point in the history
  • Loading branch information
icegreg committed Jul 15, 2015
1 parent e7150b5 commit 3d505e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dbmail/backends/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def _insert_mailer_identification_head(self):
def _get_connection(self):
if self._template.auth_credentials:
return self._kwargs.pop('connection', None) or get_connection(
**self._template.auth_credentials)
**self._template.from_email.get_auth())
return self._kwargs.pop('connection', None)

def _get_template(self):
Expand Down
4 changes: 2 additions & 2 deletions dbmail/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ def get_auth(self):
return dict(
host=self.credential.host,
port=self.credential.port,
username=self.credential.username,
password=self.credential.password,
username=str(self.credential.username),
password=str(self.credential.password),
use_tls=self.credential.use_tls,
fail_silently=self.credential.fail_silently
)
Expand Down

0 comments on commit 3d505e7

Please sign in to comment.