[Mailman-Users] Progrmatically creating a mailing list?
Barry A. Warsaw
barry at zope.com
Wed Jul 25 23:30:12 CEST 2001
>>>>> "TW" == Tushar Wagle <WAGLET at uk.ibm.com> writes:
TW> is it possible to create a mailing list 'on the fly', ie use a
TW> piece of Python code to create a mailing list? If so, can
TW> someone please post/send me some sample code (I've tried
TW> reading the docs, but haven't seen anything on this topic)?
Sure. Let's assume the Mailman package is on your sys.path and that
you can import the Mailman.MailList module. Essentially, all you need
to do is create a MailList instance with zero arguments and then call
.Create() on that instance.
See bin/newlist for a good example; it essentially just wraps a bunch
of command line processing around MailList.Create().
More information about the Mailman-Users