Fix email's subject and body

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-admin-portal/trunk@53949 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
sofia.baltzi 2018-11-23 21:29:11 +00:00
parent 7e958bbdde
commit f2d0bacaf8
1 changed files with 13 additions and 19 deletions

View File

@ -240,21 +240,8 @@ 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.subject = "[OpenAIRE-Connect] " + communityName + ": Manager";
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. "
@ -275,11 +262,18 @@ export class CommunityEditFormComponent implements OnInit{
// TODO find the right place to write it
private composeEmailToInformOldManagersForTheNewOnes(communityName: string, communityId: string, firstVersionOfManagers: any) : Email {
this.emailToInform.subject = "[OpenAIRE-Connect]" + communityName + ": New subscriber notification";
this.emailToInform.body = "<p>There is a new subscriber for " + communityName +
"community. Click <a href='https://beta.admin.connect.openaire.eu/manage-subscribers?communityId=" +
communityId + "'>here</a> to manage the subscibers list.</p><br><br>" +
"OpenAIRE team<br>"+ "<a href='https://www.openaire.eu'>www.openaire.eu</a>";
this.emailToInform.subject = "[OpenAIRE-Connect] " + communityName + ": Managers list notification";
this.emailToInform.body = "<p>There are updates in the managers list for \"" + communityName + "\" community.<br>"
+ "The list of managers is: " + this.community.managers + "</p><br>"
+ "OpenAIRE team<br>" + "<a href='https://www.openaire.eu'>www.openaire.eu</a>"
+ "<p style='font-size:11px;'>You are receiving this e-mail as manager of the community "
+ "<a href='https://beta." + communityId + ".openaire.eu/'>" + communityName + "</a>. "
+ "If you are not responsible for this community, please "
+ "<a href='mailto:openaire.test@gmail.com'>contact us</a>."
+ "<br>"
+ "Click <a href='https://beta.admin.connect.openaire.eu/manage-user-notifications?communityId=" + communityId
+ "'>here</a> to manage your notification settings. </p>";
;
this.emailToInform.recipients = firstVersionOfManagers;
return this.emailToInform;