Message76114
This example works though, and it also works in earlier Pythons.
from email.header import Header
def main():
# coding: utf8
ADDRESS = 'victor.stinner@haypocalc.com'
from email.mime.text import MIMEText
msg = MIMEText('accent \xe9\xf4\u0142', 'plain', 'utf-8')
msg['Subject'] = Header('sujet \xe9\xf4\u0142'.encode('utf-8'),
'utf-8')
msg['From'] = ADDRESS
msg['To'] = ADDRESS
text = msg.as_string()
print("--- FLATTEN ---")
print(text)
return
main() |
|
Date |
User |
Action |
Args |
2008-11-20 16:15:19 | barry | set | recipients:
+ barry, vstinner |
2008-11-20 16:15:19 | barry | set | messageid: <1227197719.76.0.357206963859.issue4306@psf.upfronthosting.co.za> |
2008-11-20 16:15:19 | barry | link | issue4306 messages |
2008-11-20 16:15:18 | barry | create | |
|