#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         |               Resolution:
     Keywords:  send_mail      |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------

Comment (by slavugan):

 I have checked for python3 everything is ok, because of with python3
 Django passes password as string to smtplib, so this error is relevant
 only for python2.
 For fix in __init__ in django/core/mail/backends/smtp.py we should add
 something like this:
 {{{
 if self.password.__class__.__name__ == 'unicode':
     try:
         self.password = str(self.password)
     except UnicodeEncodeError:
         pass
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27131#comment:4>
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/066.2a727bef74eb7075668d8ee0cfb3d414%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to