diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2023-06-18 14:39:10 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2023-06-20 23:43:23 +0200 |
commit | ea4b0b46321ff88bccf30f74cfc3fc540574eff8 (patch) | |
tree | ad58555019041dfe6d35fede7753902f3cf9b229 | |
parent | 2760a2d671293cdad53db16fd921796f50773121 (diff) | |
download | remail-ea4b0b46321ff88bccf30f74cfc3fc540574eff8.tar.gz |
remail: Fix closing boundaries
EmailMessage.defects reports a CloseBoundaryNotFoundDefect on the outgoing
PGP message.
Add the missing closing boundary after the PGP payload section and fix up the
closing boundaries format in msg_strip_.*().
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | remail/mail.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/remail/mail.py b/remail/mail.py index 02c278f..1dd6860 100644 --- a/remail/mail.py +++ b/remail/mail.py @@ -230,6 +230,7 @@ def msg_set_gpg_payload(msg, encpl, bseed, addpgp=False): content += encpl + '\n' if addpgp: content += '-----END PGP MESSAGE-----\n\n' + content += '--%s--\n' % boundary msg_set_payload(msg, msg_from_string(content)) msg_set_header(msg, 'Mime-Version', '1') @@ -269,7 +270,7 @@ def msg_strip_html(msg): content += '--%s\n' % boundary content += m.as_string() content += '\n' - content += '--%s\n' % boundary + content += '--%s--\n' % boundary msg_set_payload(msg, msg_from_string(content)) def msg_sanitize_outlook(msg): |