ruby on rails - Sending emails by schedule -


I need to send mail to the scheduled timings. I can specify two days in which the mail is sending mail.

I will use DelayedJob for this.

  class email & lt; ActiveRecord :: Base is_to: Campaign End Class CreateEmails & lt; ActiveRecord :: migrations deff changes make_table: email | T | t.integer: days1 t.integer: days2 t.timestamps end end and class campaign & lt; ActiveRecord :: Base has_many: email def end_time created_at + end_at.day end-end   

method end_time determines that when you end up with the company's activity .

finished_it to fill the field on the company's creation From database "Text">

As an alternative, you can create a rake for calling your method by sending an email, and this is the small gem of the Nifty, which is to set your cron for automation of the process Can be used for

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -