Watcher email custom body html, how to show images using a local image

alerting

(Sudheesh P) #1

I am using watcher to detect errors in the log and to fire emails based on the condition. All works perfectly. I have used a single line html to trigger emails. How can I embed a local image to the html template using img tag. For example,
src='/img/logo/logo.png'
Where can I save the local images, and How can I refer the location of the image in the body html field.

Thanks,
Sudheesh.


(Alexander Reelsen) #2

Hey,

you cannot load an image from the local path into the email because of the Java Security Manager restrictions. What you can do however is to either link to the image or use inline embedding via base64 or using CID embedded images. Everyone of those solutions has its own advantages or disadvantages, some work with email clients, but not with web clients, others require an internet connection, etc... you need to see what suits your use-case.

Hope this helps!

--Alex


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.