Merge Angular 16 Irish Monitor to develop #33
|
@ -1,6 +1,7 @@
|
||||||
import {Email} from "./email";
|
import {Email} from "./email";
|
||||||
import {Body} from "./body";
|
import {Body} from "./body";
|
||||||
import {properties} from "../../../../environments/environment";
|
import {properties} from "../../../../environments/environment";
|
||||||
|
import {User} from "../../login/utils/helper.class";
|
||||||
|
|
||||||
export class Composer {
|
export class Composer {
|
||||||
private static noteBodySize = "14px";
|
private static noteBodySize = "14px";
|
||||||
|
@ -93,14 +94,16 @@ export class Composer {
|
||||||
return email;
|
return email;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static composeEmailForDevelop(contactForm: any, admins: any): Email {
|
public static composeEmailForDevelop(contactForm: any, admins: any, user: User): Email {
|
||||||
let email: Email = new Email();
|
let email: Email = new Email();
|
||||||
|
|
||||||
email.subject = "OpenAIRE - Develop [" + properties.environment.toUpperCase() + "]";
|
email.subject = "OpenAIRE - Develop [" + properties.environment.toUpperCase() + "]";
|
||||||
email.body = "<div style='font-size:" + this.noteBodySize + "'>"
|
email.body = "<div style='font-size:" + this.noteBodySize + "'>"
|
||||||
+ "<span><b>Subject</b>: " + (contactForm.subject ? contactForm.subject : '-') + "</span><br>"
|
+ "<span><b>Name</b>: " + user.firstname + "</span><br>"
|
||||||
+ "<p>" + contactForm.message + "</p>"
|
+ "<span><b>Surname</b>: " + user.lastname + "</span><br>"
|
||||||
+ "</div>";
|
+ "<span><b>Email</b>: " + user.email + "</span><br>"
|
||||||
|
+ "<span><b>Subject</b>: " + (contactForm.subject ? contactForm.subject : '-') + "</span><br>"
|
||||||
|
+ "<p>" + contactForm.message + "</p>"
|
||||||
|
+ "</div>";
|
||||||
email.recipients = admins;
|
email.recipients = admins;
|
||||||
return email;
|
return email;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue