diff --git a/src/main/java/org/esupportail/esupsignature/service/mail/MailService.java b/src/main/java/org/esupportail/esupsignature/service/mail/MailService.java index b1185753b..27dce197a 100644 --- a/src/main/java/org/esupportail/esupsignature/service/mail/MailService.java +++ b/src/main/java/org/esupportail/esupsignature/service/mail/MailService.java @@ -105,7 +105,7 @@ public void sendSignRequestEmailAlert(SignBook signBook, User recipientUser, Dat Map toShareEmails = new HashMap<>(); for (UserShare userShare : userShareService.getUserSharesByUser(recipientUser.getEppn())) { if (userShare.getShareTypes().contains(ShareType.sign) && - ((data != null && data.getForm() != null && data.getForm().getId().equals(userShare.getForm().getId())) + ((data != null && data.getForm() != null && userShare.getForm() != null && data.getForm().getId().equals(userShare.getForm().getId())) || (workflow != null && userShare.getWorkflow() != null && workflow.getId().equals(userShare.getWorkflow().getId())) || (userShare.getAllSignRequests() && BooleanUtils.isTrue(userShare.getForceTransmitEmails())))) { for (User toUser : userShare.getToUsers()) {