Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install collective.contentrules.mailtorole

How to install collective.contentrules.mailtorole

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install collective.contentrules.mailtorole
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.4
1.7Never BuiltWhy not?
1.4 Available View build log
1.3 Available View build log
1.3a1 Available View build log
Windows (64-bit)
1.4
1.7Never BuiltWhy not?
1.4 Available View build log
1.3 Available View build log
1.3a1 Available View build log
Mac OS X (10.5+)
1.4
1.7Never BuiltWhy not?
1.4 Available View build log
1.3 Available View build log
1.3a1 Available View build log
Linux (32-bit)
1.7 Available View build log
1.4 Available View build log
1.3 Available View build log
1.3a1 Available View build log
Linux (64-bit)
1.7 Available View build log
1.4 Available View build log
1.3 Available View build log
1.3a1 Available View build log
 
License
GPL
Dependencies
Lastest release
version 1.7 on Aug 20th, 2013

Introduction

Using content rules (available since Plone 3) it's very easy to register for certain events and perform actions upon occurrence. One of these actions provided by Plone 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 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.

Note

This product supercedes collective.contentrules.mailtolocalrole. Extending that product's functionality with sending mail to global roles made it logical to rename the package.

Installation

Add collective.contentrules.mailtorole to your buildout as an egg or from source. No (generic setup) installation is necessary.

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

The checkboxes "Acquire roles" and "Global roles" are worth noting:

  • If both are unchecked, mail will only be sent to members having a local role on the object.
  • Checking "Acquire roles" will also send mail to users that have acquired the specified role from a parent of the object, ie. from higher up in the site.
  • Checking "Global roles" will also send mail to users that have the specified role globally, that is in the entire site.

Credits

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

Changes

1.7 (2013-08-12)
  • add borg_local roles [maartenkling]
1.6 (2013-02-14)
  • Updated message and title to stringinterpolation, like in plone.app.contentrules [kingel]
1.4 (2012-01-23)
  • Fix Plone3 compatibility [toutpt]
  • Add french translation [toutpt]
1.3 (2011-12-23)
  • Check if member exists before getting mailaddress [gborelli]
1.3a1 (2011-10-28)

Note

Prior to version 1.3, the product was called collective.contentrules.mailtolocalrole. That product's history is included below for completeness.

1.2 (2011-10-28)
1.1 (2011-01-07)
  • Fix the email from header that is generated from the portal owner if no from address is specified. Backported from plone.app.contentrules 4.0.2 [fredvd]
  • Add subgroups support. If a group contains a subgroup that has members, these members will also be checked for having the local role. [lzdych]
1.0 (2010-12-04)
  • Fixed error when used on Plone 4: passing 'From' to secureSend is not needed in Plone 3 and breaks in Plone 4. [maurits]
0.7 (2008-12-05 Sinterklaas)
  • Added Italian localization [paulox]
  • Added Owner to role's vocabulary [paulox]
  • Add check for empty user email address [fredvd]
  • If the localrole is added to a group, add all members of that group to the recipients list [Craig Swank]
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]

Subscribe to package updates

Last updated Aug 20th, 2013

Download Stats

Last month:3

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.