myMail = EmailMessage('subject', 'message', 'someem...@address.com', ['myem...@address.com']) myMail.send()
The error I'm getting: File "/Users/Elliot/.virtualenvs/allright/lib/python2.7/site-packages/django/core/mail/message.py" , line 342, in send return self.get_connection(fail_silently).send_messages([self]) File "/Users/Elliot/.virtualenvs/allright/lib/python2.7/site-packages/django/core/mail/backends/smtp.py" , line 100, in send_messages new_conn_created = self.open() File "/Users/Elliot/.virtualenvs/allright/lib/python2.7/site-packages/django/core/mail/backends/smtp.py" , line 67, in open self.connection.login(self.username, self.password) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/smtplib.py" , line 607, in login (code, resp) = self.docmd(encode_cram_md5(resp, user, password)) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/smtplib.py" , line 571, in encode_cram_md5 response = user + " " + hmac.HMAC(password, challenge).hexdigest() File "/System/Library/Frameworks/Python.framework/Versions/2.7/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 There was solution from this ticket <https://code.djangoproject.com/ticket/27131> with the same problem. But then the fixed commit was removed here <https://github.com/django/django/commit/dc8834cad41aa407f402dc54788df3cd37ab3e22#diff-9710092311838b71f4cdc156a22bfee1> . The settings needed to send emails now EMAIL_USE_TLS = True EMAIL_HOST = 'smtp.webfaction.com' EMAIL_HOST_USER = '****' EMAIL_HOST_PASSWORD = bytearray('******', 'utf-8') EMAIL_PORT = 587 So 2 questions: Am I missing something simple? Is this a bug and needs a ticket? Cheers -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/87c6ac90-d579-4588-a4d2-f0f0e674095b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.