Skip to Content
Menu
This question has been flagged
2 Replies
3457 Views

how to push mail into mailspool in odoo framework using python code  and how can pool send the mail

Avatar
Discard
Best Answer

You can try the following:

template = self.env['email.template'].search[('name', '=', 'Name of email template'))
if not template:
    raise exceptions.Warning("Email template not found!")
template.send_mail(record.id, force_send=True)

Setting force_send to True will immediately send the email, whereas if you set force_send to False, the mail will push to the mail queue and be sent later (30min intervals) by a cron job.

Avatar
Discard
Author Best Answer

HI Andre de Kock Thanks for response,

I Implemented another way,it's working fine .

i will try this approach also

 thank you once agian



Avatar
Discard

Glad I could help