Domanda

I'd like to be emailing every user that registers, about a moth after his registration, with additional benefits of his membership.

This is what many media sites do, e.g. ft.com sends you an email message every week, for a period of 5 weeks after your registration:

  • Week #1 - ft.com 1/5: Welcome blah blah...
  • Week #2 - ft.com 2/5: Make the most of your membership...
  • ...
  • Week #5 - ft.com 5/5: ...

What would be the best way to implement this in Drupal? E.g. is there a module, or should I go custom?

È stato utile?

Soluzione

Your best bet would probably be to go with the rules module (https://drupal.org/project/rules)

Create a new component in rules that checks if a user account was created one month ago, if so, send an email. Then schedule that rule to run every day using the scheduler.

You'll find many helpful tutorials here: https://drupal.org/node/1866108

Probably 1-6, 14, and 16 would help you a lot.

EDIT: As suggested in a comment, it is bad for performance to check every user account every day when you have a large user base, rather schedule directly on user registration.

Altri suggerimenti

You can perform this task using the cron job.There is a hook function named hook_cron() the suites your purpose mate.In the hook_cron() function check the current date with the time of registration of the user.If the difference in time is equal to the desired time period using the drupal_mail function send your mail to the user with the desired content.You can find more about hook_cron in this link.You can run the cron job at definite interval using the contributed module poormanscron.Hope that helps u mate.. :)

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top