Thanks,

I managed to do it with the send mail notification.

The only thing is that for getting all the users from the search form, I
had to have all my groups explicitly declared as readers in the section.
So if I went to a section where readers are under the general
"authenticated users" and I searched for all users (i.e. with '*') I did
not find them.

Before that I had to set the limit of maximum users to which a 
notification could be sent to a very high value.

I would have preferred if all users were in Bcc. It seems to be an option 
in the scripts of CPS but I could not find the place where I could set 
that option.

        Best regards

                Jan

On Fri, 16 Jun 2006, Olivier Grisel wrote:

> POLCHER Jan a écrit :
> 
> > 
> > Before you could go to your document and "send a mail notification" to
> > all. There were problems with the SMTP servers who did not like e-mails
> > with more than 50 addressees. Now under 3.4 you can not send a mail
> > notification to the readers of a document anymore.
> 
> You need to install the CPS Subscriptions profile in portal_setup.
> CPSSubscriptions is now optional in CPS 3.4.
> 
> > So is there a way to send a mail to all from within CPS or do I have to
> > extract all e-mails from CPS first and then do it with a simple mailer ?  
> > If it is the second option how can I simply extract the list of e-mails ?
> > 
> > Sorry for the long question but it seems such a trivial task to me and I 
> > can not see why I can not do it !
> 
> Something along those lines should do (not tested):
> 
> <quote>
> 
> from Products.CMFCore.utils import getToolByName
> 
> def getAllEmails(self):
>      dtool = getToolByName(self, 'portal_directories')
>      aclu = getToolByName(self, 'acl_users')
>      mdir = dtool[aclu.users_dir]
>      results = mdir.searchEntries(return_fields=['email'])
>      return ', '.join(info.get('email') for _, info in results)
> 
> </quote>
> 
> Code to be written in some external method for instance.
> 
> 

-- 
Jan Polcher                                           TEL: -33-6-74034060
Laboratoire de Météorologie Dynamique du CNRS         or   -33-8-71029909
Tour 45, 3eme étage, Case 99, 4 pl. Jussieu,          FAX: -33-1-44276272
75252 PARIS cedex 05
http://www.lmd.jussieu.fr/~polcher/            [EMAIL PROTECTED]

_______________________________________________
cps-users mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/cps-users

Reply via email to