marrow / mailer

A light-weight, modular, message representation and mail delivery framework for Python.
MIT License
276 stars 62 forks source link

Add workaround for the utf8-qp bug in Python 2.6.5 #34

Closed agronholm closed 4 years ago

agronholm commented 12 years ago
from email import charset
from email.mime.text import MIMEText

charset.add_charset('utf-8', charset.SHORTEST, charset.QP, 'utf-8')
mt = MIMEText(u'\u00e4', 'plain', 'utf-8')
print bytes(mt)  # Last line should read "=C3=A4, but returns =E4 on Python 2.6.5"

This makes marrow.mailer unusable on affected Python versions, but TurboMail did not have issues there.

amcgregor commented 4 years ago

Python 2 is no longer supported.