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

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Tác giả

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?

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 4 25
4301
0
thg 2 25
1424
4
thg 8 24
8740
2
thg 4 24
4395
1
thg 12 23
3724