[Mailman-Users] would it be useful to modify this code.

daniel trejo demonveen at gmail.com
Thu Mar 23 23:17:08 CET 2006


Im trying to modify Decorate.py so I can put a <img src=> html tag

So far ive modified the handler Decorate.py so all messages are multipart (
I know Its not recommended but Im quite desperate)

I want to modify this part of Decorate.py so it doesnt convert the header to
plain text ; I ve tried deleting the 'plain'  in the function MIMEText but
nothing changes, somy question is if Im on the right track or  it doesnt
have anything to do with this part?

    # Now, play games with the outer message to make it contain three
    # subparts: the header (if any), the wrapped message, and the footer (if
    # any).
    payload = [inner]
    if header:
        mimehdr =MIMEText( header, 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']
    del msg['content-transfer-encoding']
    del msg['content-disposition']
    msg['Content-Type'] = 'multipart/mixed'



More information about the Mailman-Users mailing list