I'm trying to display an image in an email. I'm using HTML text to generate the email body and trying to use the <img> tag to display the image by storing the image in a document constant and using in the src attribute. But the image does not render.
I cannot use the HTML Template method due to design restrictions. Any ideas?
Please use the below tag
<img img width=527 height=64 src="cid:<<Your File Name>>">
and the Image as attachement in Send Email Smart Service. This will work.
When you open this in Browser it will not show. but in the Email it will show. Hope this helps
Eg <img img width=527 height=64 src="cid:la_logo_h_v1.PNG">
i have attached the la_logo_h_v1.PNG in the send email smart service
Thank you @chandu but this does not seem to work.
I just tested It out and It worked for Me
Could you please add the code snippet here?
I cannot past the code. if possible please share the steps you took. Below are what i have followed.
I created a Email template file including the following tag
<img img width=527 height=64 src="cid:la_logo_h_v1.PNG">
Now my image file la_logo_h_v1.PNG is placed in a Document folder.
Open a send Email Smart service> Selected my name in "To" field, added la_logo_h_v1.PNG file attachement,
and Used the Email Template i have created(This Template contains the above tag), Save and Run in debugging mode.
Thank you. Turns out it cannot be used directly in the body and ultimately has to use a HTM Template to implement the same.
chandu - When I tried this approach the image is getting displayed in the email but also sent as attachment since image has been used through attachment. Is there a way to just display the image from appian documents without sending as attachments? or Is there a way to make use of images in template directly from appian?
I guess you can (never tried), but it is much more complicated.
If you save as html a outlook email with an embedded image, you will see that you create a folder with the files and some xml AND an html file.
If you use the same structure to create an email attaching the supporting files and folders, it might work.
Discussion posts and replies are publicly visible
© 2020 Appian. All rights reserved.