Skip to Content
Menu
This question has been flagged
3135 Zobrazenia

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
Zrušiť
Related Posts Replies Zobrazenia Aktivita
3
sep 25
1801
2
sep 25
317
1
aug 25
1773
1
máj 25
1443
0
apr 25
1285