As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
var mail = actions.create("mail"); mail.parameters.to = "test@test.com"; mail.parameters.subject = "You have a new task"; mail.parameters.from = "server@server.com"; mail.parameters.text = "You have a new task.\n\nhttp://…"; mail.execute(bpm_package);
// set the from address NodeRef person = personService.getPerson(authService.getCurrentUserName()); String fromActualUser = (String)nodeService.getProperty(person, ContentModel.PROP_EMAIL); if( fromActualUser != null && fromActualUser.length() != 0) { message.setFrom(fromActualUser); } else { String from = (String)ruleAction.getParameterValue(PARAM_FROM); if (from == null || from.length() == 0) { message.setFrom(fromAddress); } else { message.setFrom(from); } }