Hi,
i think you have to create a automated action using ir.cron then you have to filter out the all failed emails, and then you have to send the mails
Sample cron job,
<record id="ir_cron_scheduler_demo_action" model="ir.cron">
<field name="name">Send Failed Emails</field>
<field name="user_id" ref="base.user_root"/>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
<field eval="False" name="doall"/>
<field eval="'mail.mail'" name="model"/>
<field eval="'send_failed_mail'" name="function"/>
</record>
Then define a function in the name send_failed_mail.
class SendFailedMails(models.Model):
_inherit = 'mail.mail'
@api.multi
def send_failed_mail(self):
mail_failed_list = self.env['mail.mail'].search([('state', '=', 'exception')])
for failed_mail in mail_failed_list:
failed_mail.state = 'outgoing'
Hope this will help you.
See this video : https://www.youtube.com/watch?v=yaKn-9A8H8E