diff --git a/django/core/mail/message.py b/django/core/mail/message.py
index 98ab3c9..1b0bbe6 100644
a
|
b
|
def sanitize_address(addr, encoding):
|
121 | 121 | |
122 | 122 | class SafeMIMEText(MIMEText): |
123 | 123 | |
124 | | def __init__(self, text, subtype, charset): |
125 | | self.encoding = charset |
126 | | MIMEText.__init__(self, text, subtype, charset) |
127 | | |
128 | 124 | def __setitem__(self, name, val): |
129 | | name, val = forbid_multi_line_headers(name, val, self.encoding) |
| 125 | encoding = self._charset.input_charset if self._charset else None |
| 126 | name, val = forbid_multi_line_headers(name, val, encoding) |
130 | 127 | MIMEText.__setitem__(self, name, val) |
131 | 128 | |
132 | 129 | def as_string(self, unixfrom=False): |