Hi,

Le 14/05/2014 02:45, Mark Sapiro a écrit :
It works for me. The following withlist interaction based on a stripped down version of what you originally posted shows it works.

Thanks a lot, it finally works as you said…

I was pretty sure to have tested that code already, but I should have missed a small part…

This code works:

            charset = msg.get_content_charset()
            old_content = msg.get_payload(decode=True)
            new_content = re.sub(r'</body>', html_footer, old_content)
            del msg['content-transfer-encoding']
            msg.set_payload(new_content, charset)


See the full code in the repository:
https://github.com/Sylvain303/mailman-AttachmentMove/blob/master/AttachmentMove.py#L352

Regards,
Sylvain.
_______________________________________________
Mailman-Developers mailing list
[email protected]
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Reply via email to