Skip to main content

Send e-mail to users having a localrole on the object

Project description


Using content rules in Plone 3 it’s very easy to register for certain events and perform actions upon occurrence. One of these actions provided by Plone 3 is a mail action.

A limitation in the supplied mail action is that one can only provide fixed email addresses. But sometimes you’d like to send an email to a user having a certain role on the object that was involved in triggering the content rule.

An examplary use case and reason for creation of this package is the reviewer role. If an object in a certain location of the site is submitted for publication, you would like to inform the user that has the ‘reviewer’ role on this area of the site that a new document/object is available for review.

Before contentrules was available in Plone 3 the place to add this functionality was to to create a python script and attach it to the workflow ‘submit’ transition that was used for the objects.


Add collective.contentrules.mailtolocalrole 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.


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 users with local role.

Stability / feedback

this stand alone package has been derived from an implentation done during a customer project. It’s in production use, there are some tests, but it’s not 1.0 yet. Feedback is appreciated.


Most of this package has been directly copied from the mail action. Additions have been made to check for directly assigned local roles, acquired roles, fetching the e-mail To addresses from the user objects, modification of the control panel action, translations and tests.

0.6 2008-10-02

  • Fixed and added tests [fredvd]

  • Updated locales [fredvd]

0.5 unreleased

  • Add locales [fredvd]

  • Fix acquired roles checking & look up email addresses [fredvd]

  • Add checking for acquired roles [fredvd]

  • Import basic version from a client project [fredvd]

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page