diff --git a/services/src/main/java/org/keycloak/events/email/EmailEventListenerProvider.java b/services/src/main/java/org/keycloak/events/email/EmailEventListenerProvider.java index cf4de6c5ec..7cd2e1739c 100755 --- a/services/src/main/java/org/keycloak/events/email/EmailEventListenerProvider.java +++ b/services/src/main/java/org/keycloak/events/email/EmailEventListenerProvider.java @@ -50,6 +50,8 @@ public class EmailEventListenerProvider implements EventListenerProvider { this.model = session.realms(); this.emailTemplateProvider = emailTemplateProvider; this.includedEvents = includedEvents; + + this.session.getTransactionManager().enlistAfterCompletion(tx); } @Override