Message219009
Python 2.7.6 (default, May 22 2014, 00:19:36)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from email.mime.multipart import MIMEMultipart
>>> new_msg = MIMEMultipart('alternative')
>>> new_msg.set_charset('us-ascii')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/python/lib/python2.7/email/message.py", line 268, in set_charset
cte(self)
File "/opt/python/lib/python2.7/email/encoders.py", line 73, in encode_7or8bit
orig.encode('ascii')
AttributeError: 'list' object has no attribute 'encode'
>>>
I know it is not necessary.
How come that
new_msg.set_charset('us-ascii')
works? |
|
Date |
User |
Action |
Args |
2014-05-23 22:59:43 | Viktor.Szépe | set | recipients:
+ Viktor.Szépe, barry, r.david.murray |
2014-05-23 22:59:43 | Viktor.Szépe | set | messageid: <1400885983.53.0.980235742965.issue21567@psf.upfronthosting.co.za> |
2014-05-23 22:59:43 | Viktor.Szépe | link | issue21567 messages |
2014-05-23 22:59:42 | Viktor.Szépe | create | |
|