Hej,
mam taką implementację wysyłki wiadomości
@Override
public void sendEmail(String to, String subject, String content) {
MimeMessage mail = javaMailSender.createMimeMessage();
try {
MimeMessageHelper helper = new MimeMessageHelper(mail, true);
helper.setTo(to);
helper.setReplyTo("[email protected]");
helper.setFrom("[email protected]");
helper.setSubject(subject);
helper.setText(content, true);
} catch (MessagingException e) {
e.printStackTrace();
}
javaMailSender.send(mail);
}
w Thymeleaf templejcie gdy
<img th:src="@{/images/logo.png}" th:width="90" th:height="22" alt="logo" class="logo-default" />
dostaję
org.thymeleaf.exceptions.TemplateProcessingException: Link base "/images/logo.png" cannot be context relative (/) or page relative unless you implement the org.thymeleaf.context.IWebContext interface (context is of class: org.thymeleaf.context.Context) (employmentMessageToClient:24)
na pewno ktoś z Was to robił, proszę :)