[Trunk | Admin Tools]: EmailController.java: Added method "notifyNewManager()" (/notifyNewManager) to send a wellcome email to a new manager (recipient not by portal - user is sending email to himself).

This commit is contained in:
Konstantina Galouni 2021-03-04 16:22:37 +00:00
parent f7c9a6ce38
commit 0f14a41d6f
1 changed files with 10 additions and 0 deletions

View File

@ -73,6 +73,16 @@ public class EmailController {
}
@RequestMapping(value = "/notifyNewManager", method = RequestMethod.POST)
public Boolean notifyNewManager(@RequestBody Email email) throws Exception {
String userMail = rolesUtils.getEmail();
ArrayList<String> sendTo = new ArrayList<>();
sendTo.add(userMail);
boolean success =emailSender.send(sendTo,email.getSubject(),email.getBody(), true);
return success;
}
@RequestMapping(value = "/notifyManagers/{pid}/{newRoleType}", method = RequestMethod.POST)
public Boolean notifyManagers(@PathVariable(value = "pid") String pid,
@PathVariable(value = "newRoleType") String newRoleType,