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

Mark Sapiro msapiro at value.net
Fri Mar 24 06:13:12 CET 2006

daniel trejo wrote:

>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)

It's your loaded gun and your foot...

>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?

I'm mildly surprised nothing changes, since deleting the 'plain'
argument results in a call with the sub-type argument equal to the
character set. You might actually want to look at the definition of
MIMEText() (e.g., at <http://docs.python.org/lib/node588.html>) before
you start trying to alter its arguments.

>    # 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)

Assuming the rest of what you've done is OK, what you want here is

        mimehdr =MIMEText( header, 'html', lcset)

Mark Sapiro <msapiro at value.net>       The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the Mailman-Users mailing list