
As site owner, I would like members to get reminder e-mails if they have not logged in for a month. This is important since it helps catching some users who otherwise would leave the site permanently.
How to Demo:
- Log in to the site as administrator.
- Go to admin/config/workflow/rules/schedule and verify that a reminder e-mail has been scheduled to be sent out to the administrator in one month.
- Log out and log in again.
- Check that the scheduled time for the reminder has been pushed forward by a minute or so.
Required Preparations:
- A standard Drupal installation.
Additional Comments:
- If the client wants repeated reminders, this can be achieved by having the action set scheduling itself in (say) another two months. When repeating e-mails, it is important to allow users to opt-out and turn off the notifications.
Modules:
Additional Resources:
Downloads:
| Attachment | Size |
|---|---|
| 1.41 KB |
Suggested Solution:
- Go to the components tab in Rules and add a new action set. Give it the name send reminder e-mail. Have the action set receive a user object as parameter, with the label account. (See rules components in chapter 12.)
- In the action set, add the action send mail, with [account:mail] as the recipient. Use replacement patterns to include the user name in the sent message. (See managing actions in chapter 12.)
- At the Rules overview page, add a new reaction rule schedule reminder e-mail, triggering on the event user has logged in. (See configuring reaction rules in chapter 12.)
- In the reaction rule, add the action schedule component evaluation. Select the send reminder e-mail component. Set +1 month as scheduled evaluation date, send reminder to to user [account:uid] as identifier, and select the logged in user to send as parameter to the action set. (See scheduling actions with Rules Scheduler in chapter 12.)
Solution Video: