Stefan Hofmeir wrote: > >Am Montag, 7. Februar 2005 um 02:48 schrieb Mark Sapiro: >>>How it is possible to sent also a real name like >>>From: "list ABC <[EMAIL PROTECTED]>" in every newsletter? > >> You have to hack Mailman/Handlers/Cleanse.py to do this. >thanks! > >Original code: >msg['From'] = mlist.GetListEmail() > >I tried >msg['From'] = mlist.real_name() % ' <' % mlist.GetListEmail() % '>' >msg['From'] = mlist.real_name() + ' <' + mlist.GetListEmail() + '>' >msg['From'] = mlist.real_name() . ' <' . mlist.GetListEmail() . '>' >but it doesn�t work. > >What is the right syntax?
The second form is good, but real_name is an attribute, not a method so you say msg['From'] = mlist.real_name + ' <' + mlist.GetListEmail() + '>' (and be sure to preserve indentation) Note that Tokio replied >It sounded like a reasonablly small and nice hack request so I inserted >a few steps of code in Cleanse.py. I used internal_name instead of >real_name though. It was checked in CVS and will be in 2.1.6 soon. So it might be better to do it the same way. You can see Tokio's change in patch form at http://cvs.sourceforge.net/viewcvs.py/mailman/mailman/Mailman/Handlers/Cleanse.py?r1=text&tr1=2.5.2.1&r2=text&tr2=2.5.2.2&diff_format=u -- Mark Sapiro <[EMAIL PROTECTED]> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan ------------------------------------------------------ Mailman-Users mailing list [email protected] http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp
