A site may want to react on a membership that is about to expire. For example, to send a reminder email 2 months before a membership term expires. We need to create a Rules event for "Membership term is about to expire". There should be an option to select a time offset (eg. -2 months).

Comments

Channel Islander’s picture

StatusFileSize
new4.04 KB

Don't use this version of the script.

I don't know how to delete it, but please use the version uploaded in the following post.

Because a user may have another Membership Term ready to be auto-initiated when his current Term expires, the search for expiring Memberships was a little more complicated than it appeared.

Channel Islander’s picture

StatusFileSize
new4.24 KB

Here's a Perl program to send membership expiration notifications via email.

Please make sure you have the latest version of this file.

From the README:

OVERVIEW

This is a Perl program to automate sending reminder notifications via email to Members of a Drupal website whose Membership is soon to expire. It works with the Membership Entity Drupal contributed modules, which do not, as of 12/03/2014, expose expiration dates to work with Drupal Rules.

The program uses an external configuration file for setting options and the Perl Template Toolkit to keep the content of the notification emails out of the program code. You will have to edit the configuration file, and may edit the templates to customize your reminder notifications, but you don't have to edit any code or even know anything about it to use this program.

Feedback most welcome.

- nick

Channel Islander’s picture

Channel Islander’s picture

StatusFileSize
new4.56 KB

The latest version of my program notify_expiring_members is available at http://websitebackendsolutions.com/blog/drupal-membership-entity-notify-expiring-members.

Now supports using negative number of days 'before' expiration to send a message after it occurs.

Download the software and run it from cron, or copy the SQL and make your own utility.

Cheers!

canardesign’s picture

Trying to use this cool program but I always get
## OVH ## START - 2015-08-31 07:37:02.736538 executing: /.../.../notify_expiring_members/notify_expiring_members.pl
## OVH ## ERROR command '/.../.../notify_expiring_members/notify_expiring_members.pl' must be executable
## OVH ## END - 2015-08-31 07:37:02.750516 exitcode: 255
after cron runs
set permissions to 777 with no luck. Any idea ?

kiss.jozsef’s picture

Hello,
I created a sandbox module which implements a rules event and custom logging for expiring memberships.

https://www.drupal.org/sandbox/kiss.jozsef/2594193

welly’s picture

The other option would be to use Rules Scheduler to trigger a rules component that will send an email out two months before the membership will expire.

maq.said’s picture

I checked, above notify_expiring_members.tar_.gz 4.56 KB but can't import it. Can I know the final version.

vIQleS’s picture

Has this been implemented? Or is there a simple solution?

I also have some other questions - is there a manual / video walkthrough for how to set this all up?

(I.e. how to set it up so that people can join / manage their own memberships etc. I've installed this on a test site and figured out how to add types and members, but but I can't figure out how to make it possible for a user or new (non-user) member to "join" / renew etc.