Is it possible to queue all email called by the controller until a user let it send?
It seems that deliver_later
can only specify a time, But I want to wait until I let it send out.
Join Stack Overflow to learn, share knowledge, and build your career.
Is it possible to queue all email called by the controller until a user let it send?
It seems that deliver_later
can only specify a time, But I want to wait until I let it send out.
The Rails approach would be to not send it until the user initiates such a sending action, then generate and send it.
If you need to pre-send it for some reason, capture whatever data is necessary for the rendering to occur then save that in a table for future use. When the user initiates the sending, make the final send call with that data.