Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2952 Lượt xem

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>

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 8 25
1510
1
thg 5 25
1222
2
thg 5 25
1339
0
thg 4 25
1089
1
thg 3 25
1563