2

I'm setting up a real estate website that sends an email to a user notifying them when a property meeting their specifications is uploaded.

Any ideas how I can do this in drupal 6/7 ?

2 Answers 2

1

Take a look at subscriptions module also and especially at this tutorial. I think this is a much simpler approach.

1
  • This is looking way better than my thoughts.
    – adharris
    Commented Feb 3, 2012 at 17:03
0

Just speculation here, but I'd have a bunch of CCK/Fields and Taxonomies on your property content type. Then I'd put those same fields/taxonomies on the User objects (in 7 you can do this directly, because users are fieldable, but in 6 you would use something like Content Profile)

Then you would hook into the saving/updating of your property content type (most likely using a combination of hook_nodeapi in 6, hook_node_insert and hook_node_update in 7 and hook_form_alter) to compare the fields/tags on the property to users with the same or similar tags/fields and then send those users an email.

If you have large number of users/properties, you'll probably want to use hook_cron to batch process the recently updated nodes instead of doing them on demand. Also, you should be sure to store which properties a user has been notified of to avoid duplicates.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.