How to enable/disable ActionMailer upon request

前提是你 提交于 2020-01-06 04:09:26

问题


I need to disable/enable ActionMailer upon user request.

For example, if user selects disable emails, no email will be sent till he turns it on.

How to do this, without adding any conditions to Model callbacks?


回答1:


I check this in mail interceptor. Good article here

The inelegant thing here is to get users via their email from the message.



来源:https://stackoverflow.com/questions/21355709/how-to-enable-disable-actionmailer-upon-request

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!