[Django] #32331: Error: 'ascii' codec can't encode character '\xc4' when using special-character in EMAIL_HOST_PASSWORD

8 views
Skip to first unread message

Django

unread,
Jan 7, 2021, 10:05:15 AM1/7/21
to django-...@googlegroups.com
#32331: Error: 'ascii' codec can't encode character '\xc4' when using special-
character in EMAIL_HOST_PASSWORD
-------------------------------------+-------------------------------------
Reporter: Jln Wntr | Owner: nobody
Type: Bug | Status: new
Component: Core | Version: master
(Mail) | Keywords: SMTP, Unicode,
Severity: Normal | password
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
I am using an ''Ä'' for ''EMAIL_HOST_PASSWORD'' in my ''settings.py''.

This results in an
**UnicodeEncodeError** : 'ascii' codec can't encode character '\xc4' in
position 36: ordinal not in range(128)
in line ''102'' in ''django/django/core/mail/backends/smtp.py''

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

Django

unread,
Jan 8, 2021, 12:33:16 AM1/8/21
to django-...@googlegroups.com
#32331: Using non-ASCII chars in EMAIL_HOST_PASSWORD raises UnicodeEncodeError.

-------------------------------------+-------------------------------------
Reporter: Jln Wntr | Owner: nobody
Type: Bug | Status: closed
Component: Core (Mail) | Version: master
Severity: Normal | Resolution: invalid
Keywords: SMTP, Unicode, | Triage Stage:
password | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* resolution: => invalid


Comment:

Thanks for this report, however Django passes passwords directly to the
[https://docs.python.org/3/library/smtplib.html#smtplib.SMTP.login
SMTP/SMTP_SSL.login()]. It's an issue in `smtplib` not in Django, see
https://bugs.python.org/issue29750.

--
Ticket URL: <https://code.djangoproject.com/ticket/32331#comment:1>

Reply all
Reply to author
Forward
0 new messages