aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Handlers
diff options
context:
space:
mode:
authorbwarsaw <>2003-01-07 14:17:51 +0000
committerbwarsaw <>2003-01-07 14:17:51 +0000
commitdd7be16501b1c072891339d20d8da90e2d923671 (patch)
tree475f7720299b3a77c51b4c121e597216cb073cf9 /Mailman/Handlers
parentd49a950d666da64e1c14083d3d7aa7e1b78982c7 (diff)
downloadmailman2-dd7be16501b1c072891339d20d8da90e2d923671.tar.gz
mailman2-dd7be16501b1c072891339d20d8da90e2d923671.tar.xz
mailman2-dd7be16501b1c072891339d20d8da90e2d923671.zip
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.
Diffstat (limited to 'Mailman/Handlers')
-rw-r--r--Mailman/Handlers/Decorate.py8
1 files changed, 6 insertions, 2 deletions
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']