Fix su invio email di errore con allegato vuoto
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user