Skip to the content
Documentation

Notifications

No ratings yet

Notifications e-mail users when something changes in the content they follow, and when a collaboration item (such as an approval) needs them. Users choose what they follow and whether they get mail at once or as a daily, weekly or monthly digest. Nothing is sent until the notification cronjob runs.

How it works

  1. Publishing content, or a step in a collaboration item, writes an event to the database.
  2. A run (the cronjob, Run now on the status page, or exp:notification:run) gives every pending event to the handlers: ezsubtree (followed items), ezcollaborationnotification (collaboration items) and ezgeneraldigest (digests).
  3. The handlers write one message per recipient who may read the content, and send it at once or keep it for the digest.
  4. Events that nothing waits for any more are removed.

Setting it up

Run the cronjob part notification; it is also in the group frequent. Every five minutes is a good default:

*/5 * * * * cd /path/to/installation && php runcronjobs.php -s site frequent >> var/log/cron-frequent.log 2>&1

Users need the policy notification/use (see Granting access to notifications). Mail goes through the transport of site.ini [MailSettings]; the sender is notification.ini [MailSettings] EmailSender, or site.ini [MailSettings] AdminEmail when it is empty.

The administration

Setup > Notification (/notification/status, policy notification/administrate) shows pending events, digest items, subscriptions and the last runs, lists problems, and has Run now, Preview (dry run) and the cleanup of old events.

The Notification status page of the Exponential 6 administration showing Nothing looks wrong, the counts of waiting events, digests and subscriptions, the Run now and Preview buttons, recent runs and the event list

Setup > Notification (/notification/status): whether anything looks wrong, what waits, the recent runs of the notification cronjob, Run now and Preview (dry run).

Console commands

# state of the system: pending events, digests, subscriptions, last runs, problems
./console exp:notificationstatus --allow-root-user
# a run: shows what would be sent; --apply sends
./console exp:notificationrun --allow-root-user
./console exp:notificationrun --apply --allow-root-user
# list events, or remove old ones (--apply)
./console exp:notificationevents --allow-root-user
# subscriptions per user and subtree, or remove those whose content is gone (--apply)
./console exp:notificationsubscriptions --allow-root-user

Settings

# notification.ini
[NotificationSettings]
# editors may publish without notifying followers (a checkbox in the edit form)
PublishWithoutNotification=disabled
# notify only about the classes in IncludeClasses[]
NotificationFilterByClassIdentifier=disabled
IncludeClasses[]

[MailSettings]
EmailSender=
# enabled: the mail is sent as HTML in the mail layout too; disabled: as text only
HTMLLayout=enabled

The pages of this section

Related pages

In this section

Contributors

Comments (4 historical)

Written by readers of the earlier documentation sites, kept as they were.

  1. Preconfigured Subtree Navigation-Button

    Jonas Fischer ·

    Is it possible to provide a Button which automatically subscribes registered users to a pre-configured subtree? If so, how do I get it?

  2. Reject Email Notification

    Andry ·

    Hi,
    I already created a workflow and am able to receive email notification for approval,
    but when the article is rejected for publish, I don't receive any email notification.
    Is there a way to get email notification when the article was rejected?
    How to get email notfication for collaboration?
    Thank you very much

    1. Re: Reject Email Notification

      Cedric Monroe ·

      I have the same doubt, can anybody help us?

  3. about notifications URL in site admin

    Jorge Armando ·

    It was hard to discover that tha follow phrase: "If you need to launch this script manually, add the "notification/runfilter" notation to the administration interface URL and then click the "Run notification filter" button there (see the next screenshot)."
    So I going to be more clear to help new users...
    lets think the url to your administration interfaz is http://www.midomain.com/index.php/ezwebin_site_admin
    so "add the notification/runfilter" notation to the administration interface URL means, you manually type the url like this:
    http://www.midomain.com/index.php...in_site_admin/notification/runfilter
    And the will appear the below image.

Comments

Add a comment

Comments are read by a moderator before they appear.