I'm trying to send an email with a template using springMvc. I used Velocity to disay the template. The problem is that the image in the cannot appear in my email. And I'm sure that my src is incorrect! Here is my template.vm
<html>
<body>
<h3>Hi ${user.login}, welcome to the Chipping Sodbury On-the-Hill message boards!</h3>
<img src="fond-bleu.jpg">
<div>
Your email address is <a href="mailto:${user.emailAddress}">${user.emailAddress}</a>.
</div>
</body>
</html>
Your problem has nothing to do with Velocity, and I'm pretty sure your URL is not correct:
When displaying an image in an email, you have to choose between three solutions:
http://myserver/...
)cid:{0}
)data:image/jpeg;base64,...
).There are pros and cons for each method.