[angular-16 | DONE | CHANGED]: Change email composer for Develop project (Add name, surname, email in mail body).
This commit is contained in:
parent
b69e19fa17
commit
54bff7cd4a
|
@ -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,11 +94,13 @@ 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>Name</b>: " + user.firstname + "</span><br>"
|
||||||
|
+ "<span><b>Surname</b>: " + user.lastname + "</span><br>"
|
||||||
|
+ "<span><b>Email</b>: " + user.email + "</span><br>"
|
||||||
+ "<span><b>Subject</b>: " + (contactForm.subject ? contactForm.subject : '-') + "</span><br>"
|
+ "<span><b>Subject</b>: " + (contactForm.subject ? contactForm.subject : '-') + "</span><br>"
|
||||||
+ "<p>" + contactForm.message + "</p>"
|
+ "<p>" + contactForm.message + "</p>"
|
||||||
+ "</div>";
|
+ "</div>";
|
||||||
|
|
Loading…
Reference in New Issue