Message379066
Actually, I think I am going to close this as won't fix, for two reasons.
First, this only potentially affects the legacy API, and second, in Python 3, the error you get when you do it like the original repro example seems obvious to me.
```
>>> mp = MIMEMultipart()
>>> t = MIMEText('sample text')
>>> mp.attach(t)
>>> mp.set_charset('utf-8')
Traceback (most recent call last):
File "/Users/barry/projects/python/cpython/Lib/email/message.py", line 356, in set_charset
cte(self)
TypeError: 'str' object is not callable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/barry/projects/python/cpython/Lib/email/message.py", line 364, in set_charset
payload = payload.encode('ascii', 'surrogateescape')
AttributeError: 'list' object has no attribute 'encode'
``` |
|
Date |
User |
Action |
Args |
2020-10-20 00:06:35 | barry | set | recipients:
+ barry, loewis, christian.heimes, cjw296, Sharebear, r.david.murray, michaelanckaert, nanjekyejoannah |
2020-10-20 00:06:35 | barry | set | messageid: <1603152395.39.0.948601203562.issue1823@roundup.psfhosted.org> |
2020-10-20 00:06:35 | barry | link | issue1823 messages |
2020-10-20 00:06:35 | barry | create | |
|