Fix su invio email di errore con allegato vuoto
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good

This commit is contained in:
2025-03-10 17:48:37 +01:00
parent 529ad1c730
commit 311bee077a

View File

@@ -373,8 +373,13 @@ public class MailService {
// GET DESTINATION // GET DESTINATION
String emailDestination = setupGest.getSetup(multiDBTransactionManager.getPrimaryConnection(), gestName, section, "EMAIL_FOR_LOG"); String emailDestination = setupGest.getSetup(multiDBTransactionManager.getPrimaryConnection(), gestName, section, "EMAIL_FOR_LOG");
List<EmailFileAttachment> attachments = new ArrayList<>(); List<EmailFileAttachment> attachments = null;
attachments.add(new EmailFileAttachment(fileName, fileInput));
if (fileInput != null) {
attachments = new ArrayList<>();
attachments.add(new EmailFileAttachment(fileName, fileInput));
}
sendErrorMail(multiDBTransactionManager, emailDestination, sendErrorMail(multiDBTransactionManager, emailDestination,
mailTitle, mailTitle,