Ich habe ein Problem Breite diesen Code:Set Klassenpfad Ressource
final Map<String, File> attachments = new HashMap<>();
\t \t final Map<String, String> inlineResources = new HashMap<String, String>();
\t \t inlineResources.put("logo", "/res/img/IN_payoff.png");
\t \t for (File certificateFile : certificates) {
\t \t \t attachments.put(certificateFile.getName(), certificateFile);
\t \t }
\t \t YadaEmailParam p = new YadaEmailParam();
\t \t
\t \t p.inlineResources = inlineResources;
\t \t yadaEmailService.sendHtmlEmail(p);
\t }
Dieser Fehler:
org.springframework.mail.MailSendException: Failed messages: javax.mail.MessagingException: IOException while sending message;
nested exception is:
\t java.io.FileNotFoundException: class path resource [res/img/IN_payoff.png] cannot be opened because it does not exist
Wie i-Klassenpfad einstellen kann?
Nein, das ist kein Maven Projekt. Es ist ein Java-Projekt von GitLab. Diese HTML-Datei ist eine Vorlagen-E-Mail in src/main/resources, die img ist in src/res/img –