Fix the email body for new Community Managers

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-admin-portal/trunk@53948 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
sofia.baltzi 2018-11-23 17:25:58 +00:00
parent 8e8968b6a2
commit 7e958bbdde
1 changed files with 25 additions and 5 deletions

View File

@ -223,7 +223,7 @@ export class CommunityEditFormComponent implements OnInit{
}
private sendMailToNewManagers(managers: any) {
this._emailService.sendEmail("http://scoobydoo.di.uoa.gr:8080/uoa-admin-tools/sendMail", this.composeEmailForNewManager(this.community.title, managers)).subscribe(
this._emailService.sendEmail("http://duffy.di.uoa.gr:8080/uoa-admin-tools/sendMail", this.composeEmailForNewManager(this.community.title, managers)).subscribe(
res => {
console.log("The email has been sent successfully!")
},
@ -232,7 +232,7 @@ export class CommunityEditFormComponent implements OnInit{
}
private informOldManagersForTheNewOnes(managers: any) {
this._emailService.sendEmail("http://scoobydoo.di.uoa.gr:8080/uoa-admin-tools/notifyForNewManagers/"+ this.communityId, this.composeEmailToInformOldManagersForTheNewOnes(this.community.title, this.communityId, this.firstVersionOfManagers)).subscribe(
this._emailService.sendEmail("http://duffy.di.uoa.gr:8080/uoa-admin-tools/notifyForNewManagers/"+ this.communityId, this.composeEmailToInformOldManagersForTheNewOnes(this.community.title, this.communityId, this.firstVersionOfManagers)).subscribe(
res => {
console.log("The email has been sent successfully!")
},
@ -241,11 +241,31 @@ export class CommunityEditFormComponent implements OnInit{
}
// TODO find the right place to write it
// private composeEmailForNewManager(communityName: string, newCommunityManagers: any): Email {
// this.email.subject = "[OpenAIRE-Connect] " + communityName + ": Managers list notification";
// this.email.body = "<p>There are updates in the managers list for " + communityName + " community.<br>"
// + "The list of managers is: " + newCommunityManagers + "</p><br><br>" +
// "OpenAIRE team<br>" + "<a href='https://www.openaire.eu'>www.openaire.eu</a>";
// this.email.recipients = newCommunityManagers;
//
// console.log(this.email);
//
// return this.email;
// }
private composeEmailForNewManager(communityName: string, newCommunityManagers: any): Email {
this.email.subject = "[OpenAIRE-Connect] " + communityName + ": Managers list notification";
this.email.body = "<p>There are updates in the managers list for " + communityName + " community.<br>"
+ "The list of managers is: " + newCommunityManagers + "</p><br><br>" +
"OpenAIRE team<br>" + "<a href='https://www.openaire.eu'>www.openaire.eu</a>";
this.email.body = "<div style='font-size:14px;'><p>You are receiving this e-mail as you were assigned as manager of the community <a href='https://beta."
+ this.communityId + ".openaire.eu/'>" + "\"" + communityName + "\"" + "</a> dashboard. "
+ "In order to access the administration section of your community you must first login using one of the available options. "
+ "<br>The administrative rights are associated to the e-mail address, that was used to send you this message."
+ " If you login with an account associated to a different email, please <a href='mailto:helpdesk@openaire.eu'>contact us</a>"
+ " or your colleagues, that already have access to the administration tool, to update your e-mail. <br>"
+ "You can access the administration tool by clicking the \"Manage\" button that will be available in the top right corner of the dashboard."
+ "</p><br>"
+ "OpenAIRE team<br>" + "<a href='https://www.openaire.eu'>www.openaire.eu</a>"
+ "<p style='font-size:11px;'>If you are not responsible for this community, please "
+ "<a href='mailto:openaire.test@gmail.com'>contact us</a>.</p></div>";
this.email.recipients = newCommunityManagers;
console.log(this.email);