Task Email Notifications module

Collaboration Unbundled: Extension

Edition

Incubator (services)

Issues

Git

Git

Latest

6.2

Compatible with Magnolia 6.2.

The Task Email Notifications module adds the ability to send emails to users which have a task waiting. This can be useful for publication requests. Users can receive email notifications from Magnolia about the task and its current state.

This module is at the INCUBATOR level.

  • The property nodeType on the listener configuration is overridden to use mgnl:task. It cannot be set to anything else.

  • This module is independent from workflow or the publication command chain. It reacts to changes in the task workspace only.

  • Email usernames containing dots does not work. See MGNLMAIL-105

  • Correct configuration for sending mail through Gmail is unclear. See MGNLMAIL-104

Installing with Maven

Maven is the easiest way to install the module. Add the following to your bundle:

<dependency>
  <groupId>info.magnolia.task</groupId>
  <artifactId>magnolia-task-email-notifications</artifactId>
  <version>6.2</version>
</dependency>

Usage

The module provides an event listener that is specific to task nodes.

Configuration

The module provides an additional listener extending from RestrictToNodeTypeEventListener with two additional required configurations:

Class

info.magnolia.task.observation.commands.RestrictToTaskEventListener

Property Description

status

required

The value can be any of the statuses listed here.

taskName

required

The name of the task on which the listener should react.

Other configuration options are listed in the Observation module.

The module also provides a template for new tasks. It sends a simple html email with all the details about the task. It uses a model class to retrieve data from the task node.

configuration example

Setup

The module depends on both the mail module and the observation module. Here you will find two new configurations bootstrapped into the system.

  1. Setup smtp using the Mail module.

  2. Set the value of the from property: /modules/mail/config/templatesConfiguration/publishTaskCreatedNotification@from.

  3. Set the value of the mailTo property: /modules/observation/config/listenerConfigurations/sendMailOnPublishTaskCreated/listener/params@mailTo.

  4. Activate the observation: /modules/observation/config/listenerConfigurations/sendMailOnPublishTaskCreated@active.

  5. Test out the mechanism by publishing a page. Check the inbox for the mail.

email example

Custom scripts

The module comes with a model class for retrieving task data and two example scripts. To create a customized script start with one of the scripts provided by module as a base.

Both scripts interact with info.magnolia.task.observation.model.TaskNodeModel by way of the Rendering context objects model.

Changelog

Version Notes

6.2

5.7.2

5.7.1

5.7

Initial release of the module.

Feedback

Incubators

×

Location

This widget lets you know where you are on the docs site.

You are currently perusing through the Task Email Notifications module docs.

Main doc sections

DX Core Headless PaaS Legacy Cloud Incubator modules