[Zope-CMF] CMF Question

Garry Steedman gs@styrax.com
Mon, 11 Mar 2002 16:35:22 +0000


see also: http://www.zopelabs.com/cookbook/1007342314


On 11 Mar 2002, at 10:31, Tres Seaver wrote:

From:           	Tres Seaver <tseaver@zope.com		>
To:             	<Paul_Merrill@amp.com.au>
Copies to:      	<zope-cmf@zope.org>
Subject:        	Re: [Zope-CMF] CMF Question
Date sent:      	Mon, 11 Mar 2002 10:31:52 -0500 (EST)

> On Fri, 1 Mar 2002 Paul_Merrill@amp.com.au wrote:
> 
> > Dear All,
> >
> > I note that the 1.2 version of CMF has a good news site and
> > membership list. I'm wondering whether if I add a new news item
> > whether CMF can sent an email of the item to all the members. I'm
> > very interested in a threaded discussion group, like CMF or
> > SquishDot but I need to notify people in the group that a posting
> > has been made, similar to mailman. If I must, I'll use mailman but I
> > really want to only use zope components.
> >
> > Can anyone provide feedback to my email?
> 
> It would be possible to write such a component:  for instance,
> the default memberdata tool has a method, 'searchMemberDataContents',
> which returns a sequence of '( name, email )' tuples for all members
> matching a search term;  you could write an ExternalMethod to call
> this method (it is declared private) and then use the tuples to send
> mail using the '<dtml-sendmail>' tag.
> 
> The ExternalMethod would look something like::
> 
>   from Products.CMFCore.utils import getToolByName
> 
>   def listMemberEmails( self ):
>       """
>           Return a list of '( name, email )' tuples for all members.
>       """
>       mdtool = getToolByName( self, 'portal_memberdata' )
>       return mdtool.searchMemberDataContents( search_param='email'
>          search_term='@' )
> 
> Tres.
> -- 
> ===============================================================
> Tres Seaver                                tseaver@zope.com
> Zope Corporation      "Zope Dealers"       http://www.zope.com
> 
> 
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF@zope.org
> http://lists.zope.org/mailman/listinfo/zope-cmf
> 
> See http://www.zope.org/Products/PTK/Tracker for bug reports and
> feature requests


+-------------------------------------------+
  Garry Steedman      mailto:gs@styrax.com  
  Styrax Associates  http://www.styrax.com/ 

  "The Good Man has no shape."            
+-------------------------------------------+