Skip to main content
Ask A Question
Notifications
You’re not receiving notifications from this thread.
Subscribe

Automated email notification summary

General • Asked by Andreas Koutsoukos

Hi, I like to have my application to send automated emails summary to users.
Users have multiple profiles that they can make and like to notify the users by email if there is more than 5 new profiles in the app. My app is here http://www.snappaajat.fi/ so people can add them snapchat profiles and other users can view and search.

Is there some gem that do this or can Chris make some video tutorial. ;)


If you want to send these on a regular basis, cron jobs are perfect for that. You can just set it up to run weekly and notify users from a rake task. Easy to test and maintain. I did an episode on that a while back: https://gorails.com/episodes/cron-jobs-with-whenever-gem?autoplay=1

Otherwise if you want it to happen on a trigger in-app like a notification every time a new profile is created, you can just put the logic in your controller to check who should receive the notification and then send that out. This sort of thing is a good case for using a service object (just a regular ruby class that contains the logic for it).


Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 30,005+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.