spring mvc - I can't display my image in my temlate.vm (velocity) -
i'm trying send email template using springmvc. used velocity disay template. problem image in cannot appear in email. , i'm sure src incorrect! here template.vm
<html> <body> <h3>hi ${user.login}, welcome chipping sodbury on-the-hill message boards!</h3> <img src="fond-bleu.jpg"> <div> email address <a href="mailto:${user.emailaddress}">${user.emailaddress}</a>. </div> </body> </html>
your problem has nothing velocity, , i'm pretty sure url not correct:
when displaying image in email, have choose between 3 solutions:
- hosting image somewhere (then image url
http://myserver/...
) - linking image email attachment (in case image url
cid:{0}
) - embedding image in base64 (in case image url
data:image/jpeg;base64,...
).
there pros , cons each method.
Comments
Post a Comment