From 4e9fa5b7e9ca6030a5fe2e9b0520bf8fa18e5877 Mon Sep 17 00:00:00 2001 From: Nassim Bounouas Date: Fri, 21 Jun 2019 08:49:35 +0200 Subject: Feature/subject in contact form (#1926) * #1915 Add a subject to contact form and add it to email sent * #1915 Add subject to contact form tests * #1915 Contact form test corrected && tslint correction --- server/lib/emailer.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/lib') diff --git a/server/lib/emailer.ts b/server/lib/emailer.ts index c4a5a5853..73c2bcb1b 100644 --- a/server/lib/emailer.ts +++ b/server/lib/emailer.ts @@ -402,7 +402,7 @@ class Emailer { return JobQueue.Instance.createJob({ type: 'email', payload: emailPayload }) } - addContactFormJob (fromEmail: string, fromName: string, body: string) { + addContactFormJob (fromEmail: string, fromName: string, subject: string, body: string) { const text = 'Hello dear admin,\n\n' + fromName + ' sent you a message' + '\n\n---------------------------------------\n\n' + @@ -415,7 +415,7 @@ class Emailer { fromDisplayName: fromEmail, replyTo: fromEmail, to: [ CONFIG.ADMIN.EMAIL ], - subject: CONFIG.EMAIL.OBJECT.PREFIX + 'Contact form submitted', + subject: CONFIG.EMAIL.OBJECT.PREFIX + subject, text } -- cgit v1.2.3