Ir al contenido
Menú
Se marcó esta pregunta
2919 Vistas

I had set my outgoing mail server and also tested the connection all was fine but the mail is not reflecting in the inbox can someone help me on this earlier in v9 it was working fine but in v11 its now working.

Since my program is not showing any error just didn't reflect in the mail.

Thanks in Advance

#py

@api.multi

def action_send_mail(self):

    template_id = self.env['ir.model.data'].get_object_reference('automat','mail_automat_sales_inquiry')[1]

    email_template_obj = self.env['mail.template'].browse(template_id)

    print (email_template_obj)

return {}

#xml

<?xml version="1.0" ?>

<openerp>

<data>

<!--Email template -->

<record id="mail_automat_sales_inquiry" model="mail.template">

<field name="name">Sales Quotation</field>

<field name="email_from">any_mail@something.com</field> 

<field name="email_to">any_mail@something.com</field>

<field name="model_id" ref="automat.model_automat_sales_inquiry"/>

<field name="auto_delete" eval="True"/>

<field name="subject">

<![CDATA[

Testing Mail in Version 11

]]></field>

<field name="body_html">

<![CDATA[

<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; ">

<p>Welcome</p>

</div>

]]></field>

</record>

</data>

</openerp>

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
may 25
1164
2
may 25
1278
0
abr 25
1059
1
abr 25
1391
1
mar 25
1512