I want to save the mail sent on certain days (eg.sunday) in database and then send them on next day. I want to know if it is possible.
And how to save the mail object into database.
I want to save the mail sent on certain days (eg.sunday) in database and then send them on next day. I want to know if it is possible.
And how to save the mail object into database.
You'll need to configure a cronjob which is executed every sunday, and which retrieves your mail-content and then sends it out...
You can use delayed_job plugin which is easy to use, you can postpone the long-computing methods to do it later in the background (with optional exact timestamp).
Yes, delayed job is the best option. The easy tutorial on how to use it is here.
CollectiveIdea's delayed_job allows you to handle email sending easily. You can call the delay method on any object and it allows you to process anything in background. Checkout the Queuing Jobs section in the documentation.