Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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.

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.3a1 (2011-10-28)

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]

Metadata

Release files for collective.contentrules.mailtorole 1.3a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for collective.contentrules.mailtorole 1.3a1
File Size Uploaded Provenance Actions
collective.contentrules.mailtorole-1.3a1.tar.gz 15.7 kB Without provenance Details for collective.contentrules.mailtorole-1.3a1.tar.gz

Release files / collective.contentrules.mailtorole-1.3a1.tar.gz

Download URL collective.contentrules.mailtorole-1.3a1.tar.gz
Size 15.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c46c737f68abaccade3f9c66c3f9a56f76f7c24fda0960fc66020aa88cae8a67
BLAKE2b-256 checksum
How to use checksums
6dbf3b9c17dd67f4fb3974b384fb0d0d93f79d5b86bb0562fcdeb62fce056ea4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for collective.contentrules.mailtorole 1.3a1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page