~tgc/mailman/2.1-da

« back to all changes in this revision

Viewing changes to Mailman/Handlers/AvoidDuplicates.py

  • Committer: Mark Sapiro
  • Date: 2013-09-27 23:33:35 UTC
  • Revision ID: mark@msapiro.net-20130927233335-o2pmv0e5k0f77sb8
Made author_is_list a 3-way with an option to wrap the message.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
from email.Utils import getaddresses, formataddr
26
26
from Mailman import mm_cfg
 
27
from Mailman.Handlers.CookHeaders import change_header
27
28
 
28
29
COMMASPACE = ', '
29
30
 
95
96
    # Set the new list of recipients
96
97
    msgdata['recips'] = newrecips
97
98
    # RFC 2822 specifies zero or one CC header
98
 
    del msg['cc']
99
99
    if ccaddrs:
100
 
        msg['Cc'] = COMMASPACE.join([formataddr(i) for i in ccaddrs.values()])
 
100
        change_header('Cc',
 
101
        COMMASPACE.join([formataddr(i) for i in ccaddrs.values()]),
 
102
        mlist, msg, msgdata)
 
103
    else:
 
104
        del msg['cc']
 
105