简体   繁体   English

与模型关联的Rails邮件程序

[英]Rails mailer, associated with a model

I need a kind of mailer, that is associated with a model. 我需要一种与模型相关联的邮件程序。

For example, it should notify subscribers, when, eg message is posted in a topic in question. 例如,它应该通知订户,例如,何时在相关主题中发布消息。

I should see, that mails are delivered, how much recipients, mail body etc. 我应该看到,邮件已寄出,有多少收件人,邮件正文等。

AFAIK, standard ActionMailer in Rails 2.3 does't have a deal with storing something in DB. AFAIK,Rails 2.3中的标准ActionMailer与在DB中存储内容没有关系。

Is there any GEM or plugin for it ? 是否有任何GEM或插件?

You might try ActiveRecord Observers to tap into model lifecycle events and trigger your mail generation. 您可以尝试使用ActiveRecord Observers进入模型生命周期事件并触发邮件生成。 You could write some sort of tallying system to keep track of the metrics you mention. 您可以编写某种统计系统来跟踪您提到的指标。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM