OperationContext ctx = new OperationContext(docCtx.getCoreSession());
ctx.setInput(docCtx.getSourceDocument());
ctx.put("addedMembers", buildPrincipalsString(addedMembers));
ctx.put("removedMembers", buildPrincipalsString(removedMembers));
Expression from = Scripting.newExpression("Env[\"mail.from\"]");
// join both list to remove email of directly affected members
addedMembers.addAll(removedMembers);
StringList to = buildRecipientsList(sw, addedMembers);
if (to.isEmpty()) {