问题
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