diff --git a/utils/email/composer.ts b/utils/email/composer.ts index 4ace4d7f..f17e34d8 100644 --- a/utils/email/composer.ts +++ b/utils/email/composer.ts @@ -6,21 +6,21 @@ export class Composer { // TODO move to properties private static openaireEmail = "mailto:openaire.test@gmail.com"; - + private static signature = "OpenAIRE team
" + "www.openaire.eu
"; private static ifYouAreNotResponsible(): string { - return "If you are not responsible for this community, please " - + "contact us."; + return "If you are not responsible for this community, please " + + "contact us. "; } - private static manageNotificationSettings(): string { - // TODO take it from the method down - return "bla"; + private static manageNotificationSettings(communityId: string): string { + return "Click here to manage your notification settings. "; } - private static youAreManagerOfTheCommunity(): string { - // TODO take it from the method down - return "bla"; + private static youAreManagerOfTheCommunity(communityId: string, communityName: string): string { + return "You are receiving this e-mail as manager of the community " + + "" + communityName + ". "; } public static composeEmailForNewManager(communityId: string, communityName: string, newCommunityManagers: any): Email { @@ -36,7 +36,7 @@ export class Composer { + " or your colleagues, that already have access to the administration tool, to update your e-mail.
" + "You can access the administration tool by clicking the \"Manage\" button that will be available in the top right corner of the dashboard." + "

" - + "OpenAIRE team
" + "www.openaire.eu
" + + this.signature + "

" + this.ifYouAreNotResponsible() + "

" + ""; email.recipients = newCommunityManagers; @@ -45,20 +45,20 @@ export class Composer { return email; } - public static composeEmailToInformOldManagersForTheNewOnes(communityName: string, communityId: string, firstVersionOfManagers: any, managers:any) : Email { - let email: Email; + public static composeEmailToInformOldManagersForTheNewOnes(communityName: string, communityId: string, firstVersionOfManagers: any, managers: any) : Email { + let email: Email = new Email(); email.subject = "[OpenAIRE-Connect] " + communityName + ": Managers list notification"; - email.body = "

" + email.body = "
" + "

There are updates in the managers list for \"" + communityName + "\" community.
" + "The list of managers is: " + managers.join(', ') + "

" - + "OpenAIRE team
" + "www.openaire.eu
" - + "

You are receiving this e-mail as manager of the community " - + "" + communityName + ". " + + this.signature + + "

" + + this.youAreManagerOfTheCommunity(communityId, communityName) + this.ifYouAreNotResponsible() + "
" - + "Click here to manage your notification settings.

" + + this.manageNotificationSettings(communityId) + + "

" + "
"; email.recipients = firstVersionOfManagers;