I wanna log the emails which are being sent from a particular method of the ActionMailer. My ActionMailer consists of many methods which sends email for different reasons, but I to log the emails which are being sent from a particular method and save them in the database.
ActionMailer doesnt allow to do the database operations.
I am newbie to rails ENV,
kindly help me out
You need create your own Delivering system. In this Delivery, you can save your email in your Database and deliver by SMTP or something else.
This method is really not a newbie system. You can create your Delivery like the Mail::SMTP (https://github.com/mikel/mail/blob/master/lib/mail/network/delivery_methods/smtp.rb ) class managing the Delivery system by smtp.