[Mailman-Users] from field with real name
msapiro at value.net
Fri Feb 18 08:24:20 CET 2005
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 <mailman at testdomain.de>" in every newsletter?
>> You have to hack Mailman/Handlers/Cleanse.py to do this.
>msg['From'] = mlist.GetListEmail()
>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
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
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