From dd7be16501b1c072891339d20d8da90e2d923671 Mon Sep 17 00:00:00 2001 From: bwarsaw <> Date: Tue, 7 Jan 2003 14:17:51 +0000 Subject: process(): Ben Gertzfield idea to add "Content-Disposition: inline" header to the headers and footers parts as a hint to persnickety clients (not mentioning Outlook here) that the text should be displayed inline instead of as attachments. It does no harm so even if it doesn't completely fix the problem it sounds like a good idea. --- Mailman/Handlers/Decorate.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Mailman') diff --git a/Mailman/Handlers/Decorate.py b/Mailman/Handlers/Decorate.py index 5605e321..27a56a9c 100644 --- a/Mailman/Handlers/Decorate.py +++ b/Mailman/Handlers/Decorate.py @@ -92,14 +92,16 @@ def process(mlist, msg, msgdata): elif msg.get_type() == 'multipart/mixed': # The next easiest thing to do is just prepend the header and append # the footer as additional subparts - mimehdr = MIMEText(header, 'plain', lcset) - mimeftr = MIMEText(footer, 'plain', lcset) payload = msg.get_payload() if not isinstance(payload, ListType): payload = [payload] if footer: + mimeftr = MIMEText(footer, 'plain', lcset) + mimeftr['Content-Disposition'] = 'inline' payload.append(mimeftr) if header: + mimehdr = MIMEText(header, 'plain', lcset) + mimehdr['Content-Disposition'] = 'inline' payload.insert(0, mimehdr) msg.set_payload(payload) wrap = 0 @@ -137,9 +139,11 @@ def process(mlist, msg, msgdata): payload = [inner] if header: mimehdr = MIMEText(header, 'plain', lcset) + mimehdr['Content-Disposition'] = 'inline' payload.insert(0, mimehdr) if footer: mimeftr = MIMEText(footer, 'plain', lcset) + mimeftr['Content-Disposition'] = 'inline' payload.append(mimeftr) msg.set_payload(payload) del msg['content-type'] -- cgit v1.2.3