Im using spring email with freemarker template engine to send email to customers. As part of the signature I would like to add an image, but can't seem to get the template to find the image. The email appears with an image icon, not the actual image. Any ideas?
In email-html.ftl :
With kind regards,
Name of firm
The image is available at /servername/contextroot/images/icon.gif
解决方案
You can't use relative image URLs in an HTML email - there's nothing for them to be relative to. You need to change your template to use a fully-qualified URL.
You can also, I believe, embed image data within the email, but that's a whole different question.