﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
27131	send_mail() error on Python 2 if smtp server uses CRAM-MD5 auth method	Slava	nobody	"{{{
send_mail('title', 'message', from_email='test@mail.com', recipient_list=['test2@mail.com'])
Traceback (most recent call last):
  File ""<input>"", line 1, in <module>
    send_mail('hello slafffko', 'message is here', from_email='test@artel7.com',
 recipient_list=['slavugan@gmail.com'])
  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

"	Bug	closed	Core (Mail)	dev	Normal	fixed	send_mail	slavugan@…	Ready for checkin	1	0	0	0	0	0
