cancel
Showing results for 
Search instead for 
Did you mean: 

Need to send Image as part of mail using Webscript

Sanjana_17
Champ on-the-rise
Champ on-the-rise

I am trying to add an image in the mail which is being triggered using a webscript(written in java). I have given the following path in the ftl file (mail template) - ${shareUrl}/res/components/images/abc.png, also have kept the image on the path - tomcat/webapps/share/components/images.

I am new to alfresco, not sure for some reason the image is not being rendered in the mail. A blank block appears in the mail when sent.  Is there any other path that I would need to give in the ftl?

1 ACCEPTED ANSWER

abhinavmishra14
World-Class Innovator
World-Class Innovator

You could try couple of tests to ensure whether image is really accessible or not.

1- When you have configured image in ftl file as: ${shareUrl}/res/components/images/abc.png

Check if you are able to access it directly via browser. e.g. if your share is running on localhost, the URL would be http://localhost:8080/share/res/components/images/abc.png. Hit the URL in browser and see if image is loading properly. 

2- If you are using ssl and your share is running e.g. https://<somehost>/share then check, what URL you actually get when email is recieved. You can save the email as html file and inspect the URL. 

Make the corrections accordingly.

~Abhinav
(ACSCE, AWS SAA, Azure Admin)

View answer in original post

2 REPLIES 2

abhinavmishra14
World-Class Innovator
World-Class Innovator

You could try couple of tests to ensure whether image is really accessible or not.

1- When you have configured image in ftl file as: ${shareUrl}/res/components/images/abc.png

Check if you are able to access it directly via browser. e.g. if your share is running on localhost, the URL would be http://localhost:8080/share/res/components/images/abc.png. Hit the URL in browser and see if image is loading properly. 

2- If you are using ssl and your share is running e.g. https://<somehost>/share then check, what URL you actually get when email is recieved. You can save the email as html file and inspect the URL. 

Make the corrections accordingly.

~Abhinav
(ACSCE, AWS SAA, Azure Admin)

Thanks for the help. It is working fine now.Smiley Happy