Aggiunti log per tracciare invio mail bolle generate e firmate
This commit is contained in:
@@ -2241,8 +2241,9 @@ public class DocumentService {
|
||||
|
||||
try {
|
||||
mailService.sendMail(null, null, elencoEmail, null, null, subject, msgText, false, fileItem);
|
||||
logger.info("[PrintDocument] Mail inviata a {} con allegato {}", elencoEmail, fileName);
|
||||
} catch (Exception e) {
|
||||
//NON BLOCCANTE
|
||||
logger.error("[PrintDocument] Errore invio mail a {} con allegato {}: {}", elencoEmail, fileName, e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,8 @@ import it.integry.ems_model.types.OperationType;
|
||||
import it.integry.ems_model.utility.Query;
|
||||
import it.integry.ems_model.utility.UtilityDB;
|
||||
import it.integry.ems_model.utility.UtilityDate;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -31,6 +33,8 @@ import java.util.stream.Collectors;
|
||||
@Scope(value = "request")
|
||||
public class ConSegnaService {
|
||||
|
||||
private final Logger logger = LogManager.getLogger();
|
||||
|
||||
@Autowired
|
||||
private MultiDBTransactionManager multiDBTransactionManager;
|
||||
|
||||
@@ -425,7 +429,12 @@ public class ConSegnaService {
|
||||
entityProcessor.processEntity(dtbDocPdf, multiDBTransactionManager);
|
||||
|
||||
if (!elencoEmail.isEmpty()) {
|
||||
mailService.sendMail(null, null, elencoEmail, null, null, subject, msgText, false, new FileItem(dtbDocPdf.getFilename(), dtbDocPdf.getFilecontent()));
|
||||
try {
|
||||
mailService.sendMail(null, null, elencoEmail, null, null, subject, msgText, false, new FileItem(dtbDocPdf.getFilename(), dtbDocPdf.getFilecontent()));
|
||||
logger.info("[ConSegna] Mail inviata a {} con allegato {}", elencoEmail, dtbDocPdf.getFilename());
|
||||
} catch (Exception e) {
|
||||
logger.error("[ConSegna] Errore invio mail a {} con allegato {}: {}", elencoEmail, dtbDocPdf.getFilename(), e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user