From e25b87213beff174494713319f068cc9269bf7fb Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Fri, 5 Jun 2020 08:23:52 +0200 Subject: [PATCH] 2305 - Added noReply param --- print/core/email.js | 3 ++- print/methods/closure.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/print/core/email.js b/print/core/email.js index cf6f8b663..f201be9a8 100644 --- a/print/core/email.js +++ b/print/core/email.js @@ -72,9 +72,10 @@ class Email extends Component { await getAttachments(this.path, this.attachments); const localeSubject = await this.getSubject(); + const replyTo = this.args.replyTo || this.args.auth.email; const options = { to: this.args.recipient, - replyTo: this.args.auth.email, + replyTo: replyTo, subject: localeSubject, html: rendered, attachments: attachments diff --git a/print/methods/closure.js b/print/methods/closure.js index c947a0468..3bcca9d4e 100644 --- a/print/methods/closure.js +++ b/print/methods/closure.js @@ -58,7 +58,8 @@ module.exports = app => { const args = Object.assign({ ticketId: ticket.id, recipientId: ticket.clientFk, - recipient: ticket.recipient + recipient: ticket.recipient, + replyTo: ticket.salesPersonEmail }, reqArgs); const email = new Email('delivery-note-link', args);