collective.contentrules.mailtogroup

Warning
This product has not had a release in over 1 year and may no longer be maintained.
by Kim Chee Leong last modified May 18, 2011 07:25 AM

Send e-mail to groups and members defined in the action.

Project Description

Introduction

This action rule allows you to send e-mail to groups and users. The groups and users are defined in the action rule, it's possible to combine both. This action was made because the current actions cannot mail to a dynamic set of users (group). Adding multiple members was also added because you don't always know the e-mail of a certain user.

Installation

Add collective.contentrules.mailtogroup to your buildout as an egg or from source. No (generic setup) installation is necessary, the action is registered using ZCML. So do add the package to the zcml slug list of your [instance] section.

Usage

Go to the Plone Control Panel, select Content Rules and add a new Rule. Under 'actions' you now have a new option: Send email to groups and users.

When searching for users and groups make sure you press the search button. Don't hit enter. Search results for these items are only shown when you press search.

UberMultiSelectionWidget

This content rule uses the UberMultiSelectionWidget from plone.app.form. This widget is broken in version 1.1.7 of plone.app.form. Plone 3.3.4 has this version.

As of version 1.1.8 the widget is working again. To use the correct version pin down plone.app.form:

[versions] ... plone.app.form = 1.1.8

Credits

Most of this package is directly copies from the plone.app.contenttules.mail action. The package collective.contentrules.mailtolocalrole was also used as an example.

Changelog

1.2 (2011-04-05)

  • Added z3c.autoinclude in setup.py [kcleong]
  • Using 'send' instead of deprecated 'secureSend' in Plone 4. For Plone 3 secureSend is used. [kcleong]
  • Use include for CMFCore in zcml, fixes permission bug in Plone 4.1 [uittenbroek]

1.1 (2010-12-06)

  • Fixed error when used on Plone 4: passing 'From' to secureSend is not needed in Plone 3 and breaks in Plone 4. [maurits]

1.0 (2010-02-12)

  • No bug changes, just marking it as final.
  • Must pin down plone.app.form on 1.1.8 if you're using version 1.1.8, bug in UberMultiSelectionWidget.

Current Release
collective.contentrules.mailtogroup 1.2

Released Apr 05, 2011 — tested with Plone 4, Plone 3

Fix for permission error in Plone 4.1, sending mail is backwards compatible with Plone 3.
More about this release…

Download file Get collective.contentrules.mailtogroup for all platforms
collective.contentrules.mailtogroup-1.2.tar.gz
If you are using Plone 3.2 or higher, you probably want to install this product with buildout. See our tutorial on installing add-on products with buildout for more information.

All Releases

Version Released Description Compatibility Licenses Status
1.2 Apr 05, 2011 Fix for permission error in Plone 4.1, sending mail is backwards compatible with Plone 3. More about this release…
Plone 4
Plone 3
GPL final
1.1 Dec 06, 2010 Fixed error when used on Plone 4: passing 'From' to secureSend is not needed in Plone 3 and breaks in Plone 4. More about this release…
Plone 4
Plone 3
GPL final
1.0 Feb 12, 2010 Updated README More about this release…
Plone 3
GPL final
0.1dev-r81015 More about this release… alpha
0.1 More about this release… GPL pre-release

Comments (4)

Jon Stahl Dec 04, 2010 04:12 AM
This product is not (quite) Plone 4 compatible, but the fix is quite easy and is documented at http://plone.org/documentat[…]deprecated-use-send-instead
Troy Frew Mar 15, 2011 12:37 PM
Plone 4.1 errors with this


Traceback (most recent call last):
  File "/plone/ploneinstalls/test4.1a3/buildout-cache/eggs/Zope2-2.13.5-py2.6.egg/Zope2/Startup/run.py", line 72, in <module>
    run()
  File "/plone/ploneinstalls/test4.1a3/buildout-cache/eggs/Zope2-2.13.5-py2.6.egg/Zope2/Startup/run.py", line 21, in run
    starter.prepare()
  File "/plone/ploneinstalls/test4.1a3/buildout-cache/eggs/Zope2-2.13.5-py2.6.egg/Zope2/Startup/__init__.py", line 86, in prepare
    self.startZope()
  File "/plone/ploneinstalls/test4.1a3/buildout-cache/eggs/Zope2-2.13.5-py2.6.egg/Zope2/Startup/__init__.py", line 259, in startZope
    Zope2.startup()
  File "/plone/ploneinstalls/test4.1a3/buildout-cache/eggs/Zope2-2.13.5-py2.6.egg/Zope2/__init__.py", line 47, in startup
    _startup()
  File "/plone/ploneinstalls/test4.1a3/buildout-cache/eggs/Zope2-2.13.5-py2.6.egg/Zope2/App/startup.py", line 118, in startup
    load_zcml()
  File "/plone/ploneinstalls/test4.1a3/buildout-cache/eggs/Zope2-2.13.5-py2.6.egg/Zope2/App/startup.py", line 52, in load_zcml
    load_site()
  File "/plone/ploneinstalls/test4.1a3/buildout-cache/eggs/Zope2-2.13.5-py2.6.egg/Zope2/App/zcml.py", line 46, in load_site
    _context = xmlconfig.file(site_zcml)
  File "/plone/ploneinstalls/test4.1a3/buildout-cache/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/xmlconfig.py", line 653, in file
    context.execute_actions()
  File "/plone/ploneinstalls/test4.1a3/buildout-cache/eggs/zope.configuration-3.7.2-py2.6.egg/zope/configuration/config.py", line 606, in execute_actions
    callable(*args, **kw)
  File "/plone/ploneinstalls/test4.1a3/buildout-cache/eggs/AccessControl-2.13.4-py2.6-linux-x86_64.egg/AccessControl/security.py", line 165, in protectClass
    permission = getUtility(IPermission, name=permission_id)
  File "/plone/ploneinstalls/test4.1a3/buildout-cache/eggs/zope.component-3.9.5-py2.6.egg/zope/component/_api.py", line 169, in getUtility
    raise ComponentLookupError(interface, name)
zope.configuration.config.ConfigurationExecutionError: <class 'zope.component.interfaces.ComponentLookupError'>: (<InterfaceClass zope.security.interfaces.IPermission>, 'cmf.ManagePortal')
  in:
  File "/plone/ploneinstalls/test4.1a3/buildout-cache/eggs/collective.contentrules.mailtogroup-1.1-py2.6.egg/collective/contentrules/mailtogroup/actions/configure.zcml", line 16.4-21.8
      <browser:page
        for="plone.app.contentrules.browser.interfaces.IRuleActionAdding"
        name="plone.actions.MailGroup"
        class=".mail.MailGroupAddForm"
        permission="cmf.ManagePortal"
        />
Kim Chee Leong Apr 05, 2011 01:56 PM
Content rule products is fully compatible with Plone 4.0/4.1
Otártics András May 21, 2011 01:06 PM
With this
[versions] ... plone.app.form = 1.1.8
it does not work on Plone 4 (actually it kills many pages).
If you leave it out it works.