#27131: send_mail error if smtp server uses CRAM-MD5 auth method
-------------------------------+-----------------------
     Reporter:  slavugan       |      Owner:  nobody
         Type:  Uncategorized  |     Status:  new
    Component:  Core (Mail)    |    Version:  1.8
     Severity:  Normal         |   Keywords:  send_mail
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+-----------------------
 {{{
 send_mail('title', 'message', from_email='[email protected]',
 recipient_list=['[email protected]'])
 Traceback (most recent call last):
   File "<input>", line 1, in <module>
     send_mail('hello slafffko', 'message is here',
 from_email='[email protected]',
  recipient_list=['[email protected]'])
   File "/home/slav/venv/luxjango/local/lib/python2.7/site-
 packages/django/core/m
 ail/__init__.py", line 62, in send_mail
     return mail.send()
   File "/home/slav/venv/luxjango/local/lib/python2.7/site-
 packages/django/core/m
 ail/message.py", line 303, in send
     return self.get_connection(fail_silently).send_messages([self])
   File "/home/slav/venv/luxjango/local/lib/python2.7/site-
 packages/django/core/m
 ail/backends/smtp.py", line 100, in send_messages
     new_conn_created = self.open()
   File "/home/slav/venv/luxjango/local/lib/python2.7/site-
 packages/django/core/m
 ail/backends/smtp.py", line 67, in open
     self.connection.login(self.username, self.password)
   File "/usr/lib/python2.7/smtplib.py", line 607, in login
     (code, resp) = self.docmd(encode_cram_md5(resp, user, password))
   File "/usr/lib/python2.7/smtplib.py", line 571, in encode_cram_md5
     response = user + " " + hmac.HMAC(password, challenge).hexdigest()
   File "/usr/lib/python2.7/hmac.py", line 75, in __init__
     self.outer.update(key.translate(trans_5C))
 TypeError: character mapping must return integer, None or unicode
 }}}

 email backend should pass passwrord as string, not as unicode to smtplib
 to avoid this error

--
Ticket URL: <https://code.djangoproject.com/ticket/27131>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.6abbf668e2dabfa56b3feac57aa3a6a2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to