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
- Boekhouding
- Voorraad
- PoS
- Project
- MRP
Deze vraag is gerapporteerd
2
Antwoorden
3193
Weergaven
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
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
Aanmelden
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.