create new function for composing email for explore (contact-us page)

This commit is contained in:
Alex Martzios 2022-10-03 13:39:35 +03:00
parent ac25e160fe
commit 7da81d02b5
1 changed files with 16 additions and 1 deletions

View File

@ -78,6 +78,21 @@ export class Composer {
return email; return email;
} }
public static composeEmailForExplore(contactForm: any, admins: any): Email {
let email: Email = new Email();
email.subject = "OpenAIRE - Explore [" + properties.environment.toUpperCase() + "]";
email.body = "<div style='font-size:" + this.noteBodySize + "'>"
+ "<span><b>Name</b>: " + contactForm.name + "</span><br>"
+ "<span><b>Surname</b>: " + contactForm.surname + "</span><br>"
+ "<span><b>Email</b>: " + contactForm.email + "</span><br>"
+ "<span><b>Affiliation</b>: " + contactForm.affiliation ? contactForm.affiliation : '-' + "</span><br>"
+ "<p>" + contactForm.message + "</p>"
+ "</div>";
email.recipients = admins;
return email;
}
public static composeEmailForUsageCounts(contactForm: any, admins: any): Email { public static composeEmailForUsageCounts(contactForm: any, admins: any): Email {
let email: Email = new Email(); let email: Email = new Email();