Need to send Image as part of mail using Webscript

cancel
Showing results for 
Search instead for 
Did you mean: 
Sanjana_17
Active Member

Need to send Image as part of mail using Webscript

Jump to solution

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 Solution

Accepted Solutions
Moderator
Moderator

Re: Need to send Image as part of mail using Webscript

Jump to solution

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.

 

View solution in original post

2 Replies
Moderator
Moderator

Re: Need to send Image as part of mail using Webscript

Jump to solution

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.

 

View solution in original post

Sanjana_17
Active Member

Re: Need to send Image as part of mail using Webscript

Jump to solution

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