Skip to Content
Menu
This question has been flagged
1 Reply
2362 Views

Hi everyone,

Im sending automated mail to our customers with some following message in my mail body.

message_body = "Hi " + rec.partner_id.name + ', this is to inform you that your contract will expire on '+ rec.contract_end_date + ' , Thank you'

With this i need to insert one image also .

How can i achieve this in odoo9.0?

Please post your suggestions.

Thanku you

Avatar
Discard
Best Answer

Hi,

Try this code

<tbody>\n"
" <tr>\n"
" <td style=\"padding:2px;width:30%;\">\n"
" <img src=\"web/static/src/img/logo.png\"/>\n"
" </td>\n"
" <td style=\"vertical-align: top; padding: 8px 10px;text-align: left;font-size: 14px;\">\n"
" <a href=\"web/login\" style=\"float:right ;margin:15px auto;background: #a24689;border-radius: 5px;color: #ffffff;font-size: 16px;padding: 10px 20px 10px 20px;text-decoration: none;\">Auto Login</a>\n"
" </td>\n"
" </tr>\n"
" </tbody>

Thank you

Avatar
Discard
Author

In which part of file i need to put this code?

In body_html

Author

With this code iam not able to get the image on my mail and as well in odoo framework

Author

Does SMTP supports image inserting?