dpaluy
dpaluy

Reputation: 3715

How to enable/disable ActionMailer upon request

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?

Upvotes: 1

Views: 188

Answers (1)

apneadiving
apneadiving

Reputation: 115541

I check this in mail interceptor. Good article here

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

Upvotes: 1

Related Questions