I would like an email to be triggered to go to the lead when it comes in from our wordpress website. How do I start?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Contabilidad
- Inventario
- PoS
- Project
- MRP
Se marcó esta pregunta
2
Respuestas
3183
Vistas
Hi Jacquelyn Zalar,
You have to first configure outgoing mail server of Odoo to send an email from Odoo.Then create a mail template in XML file. e.g.
<record id="email_template" model="mail.template">
<field name="name">name of template</field>
<field name="email_from">email address of sender</field>
<field name="subject">subject of email</field>
<field name="model_id" ref="base.model_ir_ui_view"/>
<field name="body_html"><![CDATA[
<p>
Your mail-content
</p>
]]></field>
</record>
Then write below python code in file where you have written code for leads
template_id = request.env['ir.model.data'].get_object_reference(your module name,mail template id(email_template))
template_obj = request.env['mail.template'].browse(template_id)
template_obj.email_to = receiver's mail address
template_obj.send_mail(page.id, force_send=True)
Hope this will helpful to you!
Thanks
¿Le interesa esta conversación? ¡Participe en ella!
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
Registrarse
Checkout the automated action in Settings -> Technical -> Automation -> automated actions. You can created the trigger based on created . Next tab in 'Server actions to run'
create the email trigger.