What's the most elegant way to implement a digest email without reinventing a queueing system?

前端 未结 3 686
不知归路
不知归路 2021-02-06 11:24

I have my transactional email system setup & by default people get emails as events happen:

class Comment

  after_create :email_original_poster

  def email         


        
3条回答
  •  青春惊慌失措
    2021-02-06 12:16

    A digest looks like more appropriate to be done as a cron job like. You would still have to control to "who you have sent", to deal with crashes and errors, but the idea is to run, for example, on a daily basis, a custom rake task that craft your mail message including all info in a digest format and them send or queue for sending.

提交回复
热议问题