Opened 4 years ago

Closed 4 years ago

#32331 closed Bug (invalid)

Using non-ASCII chars in EMAIL_HOST_PASSWORD raises UnicodeEncodeError.

Reported by: Jln Wntr Owned by: nobody
Component: Core (Mail) Version: dev
Severity: Normal Keywords: SMTP, Unicode, password
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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

Change History (1)

comment:1 by Mariusz Felisiak, 4 years ago

Resolution: invalid
Status: newclosed
Summary: Error: 'ascii' codec can't encode character '\xc4' when using special-character in EMAIL_HOST_PASSWORDUsing non-ASCII chars in EMAIL_HOST_PASSWORD raises UnicodeEncodeError.

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

Note: See TracTickets for help on using tickets.
Back to Top