Lars Reimann wrote: > >If I add a message header (msg_header and msg_footer) mailman sets the > >> Content-Type: text/plain; charset="us-ascii" > >My Question is, if anyone can please point me to the line of code, >where this is added to a message. I already looked in Decorate.py but >my alterations (e.g. comment out the header addition) did not make any >difference. So the place where i looked might not be correct. > >I want to see how these are constructed and maybe alter to fit my >customization.
The addition of headers and footers is done by Decorate.py. When they are added as separate MIME parts, the parts are constructed by email.MIMEText.MIMEText() which is called in four places in Decorate.py. If you are asking about the case where the message is a single text/plain part and the header and/or footer are added to that part. The overall message Content-Type: is set by del msg['content-transfer-encoding'] del msg['content-type'] msg.set_payload(payload, newcset) It is the email.Message.Message.set_payload() method that actually sets the Content-Type: and Content-Transfer-Encoding: appropriate to the payload (message body) being set. -- Mark Sapiro <[EMAIL PROTECTED]> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan _______________________________________________ Mailman-Developers mailing list Mailman-Developers@python.org http://mail.python.org/mailman/listinfo/mailman-developers Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-developers%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp