Merge pull request 'refs #5941 fix(sendToSupport): fix email from' (!1711) from 5941-warnFix_email_from into test
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #1711
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
Alex Moreno 2023-08-22 05:07:52 +00:00
commit d72e3ec4ec
1 changed files with 2 additions and 2 deletions

View File

@ -33,14 +33,14 @@ module.exports = Self => {
await Self.app.models.EmailUser.findById(ctx.req.accessToken.userId, {fields: ['email']});
let html = `<strong>Motivo</strong>:<br/>${reason}<br/>`;
html += `<strong>Usuario</strong>:<br/>${ctx.req.accessToken.userId} ${emailUser.email}<br/>`;
for (const data in additionalData)
html += `<strong>${data}</strong>:<br/>${tryParse(additionalData[data])}<br/>`;
const subjectReason = JSON.parse(additionalData?.httpRequest)?.data?.error;
smtp.send({
to: config.app.reportEmail,
replyTo: emailUser.email,
to: `${config.app.reportEmail}, ${emailUser.email}`,
subject:
'[Support-Salix] ' +
additionalData?.frontPath + ' ' +