diff options
Diffstat (limited to 'Lib/email/generator.py')
-rw-r--r-- | Lib/email/generator.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/email/generator.py b/Lib/email/generator.py index 8413f3b..899adbc 100644 --- a/Lib/email/generator.py +++ b/Lib/email/generator.py @@ -400,6 +400,8 @@ class BytesGenerator(Generator): if msg._payload is None: return if _has_surrogates(msg._payload) and not self.policy.cte_type=='7bit': + if self._mangle_from_: + msg._payload = fcre.sub(">From ", msg._payload) self.write(msg._payload) else: super(BytesGenerator,self)._handle_text(msg) |