Hi, i''ve got a problem. I''ve setup my rails app to send mail, say when someone registers they get a ''hey thanks for registering'' email; that works fine. That''s firing thru using sendmail ok. Next up I''ve got a facility for people to set reminders, say for birthdays. So to remind these people I''d like something to run maybe daily and when it sees someone''s birthday is coming up fire off an email to remind them. Any ideas how I could do this automated mailing in Rails? Appreciate any help or pointers you geniuses have on this. John. (p.s. beers are on me if we ever meetup) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Write a ruby script that calls a URL that returns all the birthdays each user has saved. Then check if any are soon and call a url on your site that sends email with the user and birthday parameters. You would run this script as a daily cron job. Does that get you started? On Nov 17, 10:56 am, John Griffiths <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi, i''ve got a problem. > > I''ve setup my rails app to send mail, say when someone registers they > get a ''hey thanks for registering'' email; that works fine. > > That''s firing thru using sendmail ok. > > Next up I''ve got a facility for people to set reminders, say for > birthdays. > > So to remind these people I''d like something to run maybe daily and when > it sees someone''s birthday is coming up fire off an email to remind > them. > > Any ideas how I could do this automated mailing in Rails? > > Appreciate any help or pointers you geniuses have on this. > > John. > (p.s. beers are on me if we ever meetup) > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> I''ve setup my rails app to send mail, say when someone registers they > get a ''hey thanks for registering'' email; that works fine. > > That''s firing thru using sendmail ok. > > Next up I''ve got a facility for people to set reminders, say for > birthdays. > > So to remind these people I''d like something to run maybe daily and when > it sees someone''s birthday is coming up fire off an email to remind > them. > > Any ideas how I could do this automated mailing in Rails?cron and script/runner -philip --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Philip Hallstrom wrote:>> them. >> >> Any ideas how I could do this automated mailing in Rails? > > cron and script/runner > > -philipexcellent idea. makes perfect sense when you think about it. write a ruby script to go thru and return all users and reminders valid for sending at the current day; then iterate thru the collection emailing reminders out till you get to the bottom of the array. now couple that with cron and the script/runner to run the ruby script when you need to. thanks Phillip and eggie5, helps a lot. sincerely, John. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
John Griffiths wrote:> Philip Hallstrom wrote: >>> them. >>> >>> Any ideas how I could do this automated mailing in Rails? >> >> cron and script/runner >> >> -philip > > excellent idea. > > makes perfect sense when you think about it. write a ruby script to go > thru and return all users and reminders valid for sending at the current > day; then iterate thru the collection emailing reminders out till you > get to the bottom of the array. > > now couple that with cron and the script/runner to run the ruby script > when you need to. > > thanks Phillip and eggie5, helps a lot. > > sincerely, > > > John.p.s. found a link... http://wiki.rubyonrails.org/rails/pages/HowToRunBackgroundJobsInRails -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---