2

Is it possible to send an email without a mail template ? I need to send an email from python code without creating the mail template by xml.

Ajmal JK
  • 813
  • 4
  • 14

1 Answers1

3

Yes it is possible.You can pass the email values within the python code itself.

values = {}
email_to = 'receiver mail id'
email_from = 'sender mail id'
values['email_to'] = email_to
values['email_from'] = email_from  // Not necessary
values['subject'] = YOUR MAIL SUBJECT
values['body'] = You Email Body
self.env['mail.mail'].sudo().create(values).send() // Creating and sendimg the mail.
Ajmal JK
  • 813
  • 4
  • 14