跳至内容
菜单
此问题已终结
1 回复
6179 查看

Hi everyone,


I would like to know if it is possible to add a logo inside the email signature?

To do it, I created a field to add a picture and I try to add my logo inside the email, but it is not working.

I can only see the encoded code but not the picture (R0lGODlhEgIOAfcAAMOuI9O+NamZKW92L8uyFLu...)


 signature_logo =msg.author_id.user_ids[0].signature_logo or ''
if signature_logo:
body_html = tools.append_content_to_html(body_html, signature_logo, plaintext=True, container_tag='div')

Somone has an idea please?

Thank you a lot,


Selverine

形象
丢弃
最佳答案

Selverine,

You must add this binary data into an HTML tag. Also, the plaintext should be False, try by it.

So, singature_add  = '<br />&lt;img src="data:image/jpg;base64, %s">  % (singature_logo)

Then,

body_html = tools.append_content_to_html(body_html, signature_add,.....)

Hope this helps.

Thanks.

形象
丢弃
编写者

Hi, Thank you for your help. It doesn't consider it as HTML tag, so I have:
<img src="data:image/jpg;base64, %R0lGODlhEgIOAfcAAMOuI9O+NamZKW92L8uyFLu... Inside my email. Is it a problem of tools.append_content_to_html you think? Thank you a lot for your help. Selverine PS: Do you provide helps for developer too? My ERP is quite ready but I have few questions like this one ( You will be paid for sure).

What error do you get? Selverine, yes we do! Reach us on contact@serpentcs.com. Thanks.

Selverine, did you manage to get it done?

相关帖文 回复 查看 活动
1
4月 25
4218
0
2月 25
1320
4
8月 24
8655
2
4月 24
4320
1
12月 23
3623