Reply template - best way to show inline images

lock
push_pin
done
Beantwortet
3

Hey,

The 100 000 dollar question.
Whats the best way to try and prevent blocking of images sent from an reply template through the Email class.
Most customers accepts that images are blocked by default and its simply a standard on the web..
But, we have one customer that really dont accept this, so, i figure i´ll ask here anyway if anyone have a solution.

 

We get the same result using uploaded attachment images as well as using a base64.
It seems that it might work with using CID, but, not sure how to fix this throu reply templates.

Any ideas?

Regards
Pär

I

10. Jan. 2024 | 09:14 AM

Alle Antworten (3)

Hi Par,

 

If you add the images as an attachment when populating the Email class, this should work reliably:

 

email.addAttachment(1841313, true); 

(where 1841313 is the attachment ID in SO).

 

You can combine this logic in a reply template by adding the image as shown below:

<  img alt="Example" src="cid:att-0@online.superoffice.com" style="width: 71px; height: 71px;"    >

 

 

10. Jan. 2024 | 11:33 AM
Been working with SuperOffice for 15 years, never noticed addAttachment :)
Works exactly as expected, thanks Bas!
10. Jan. 2024 | 12:31 PM
Glad I am able to help YOU out for once... ;) Have a great day!
10. Jan. 2024 | 12:41 PM

Antwort hinzufügen