Skip to Content
मेन्यू
This question has been flagged
1 Reply
4686 Views

Hello All,

I've created my own email template and email sever both are created.

Now how can i send an email to customer from python method?

I've follow some example of v8 api which are not working for me.

Any example which can help me to achieve this feature on v9

I tried but getting this error?

self.ensure_one()
 raise ValueError("Expected singleton: %s" % self)
ValueError: Expected singleton: mail.template()

Thank you.

Prince.    

Avatar
Discard
Best Answer

Hello Prince,

Try to use this code.

template=self.env.ref('External_ID_of_email_template')

template.send_mail(self.id,force_send=True)


Hope this helps.

Avatar
Discard
Related Posts Replies Views Activity
0
फ़र॰ 18
3284
3
दिस॰ 24
5697
1
सित॰ 16
3802
0
अक्तू॰ 15
4002
0
सित॰ 25
207