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
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #1711 Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
commit
d72e3ec4ec
|
@ -33,14 +33,14 @@ module.exports = Self => {
|
||||||
await Self.app.models.EmailUser.findById(ctx.req.accessToken.userId, {fields: ['email']});
|
await Self.app.models.EmailUser.findById(ctx.req.accessToken.userId, {fields: ['email']});
|
||||||
|
|
||||||
let html = `<strong>Motivo</strong>:<br/>${reason}<br/>`;
|
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)
|
for (const data in additionalData)
|
||||||
html += `<strong>${data}</strong>:<br/>${tryParse(additionalData[data])}<br/>`;
|
html += `<strong>${data}</strong>:<br/>${tryParse(additionalData[data])}<br/>`;
|
||||||
|
|
||||||
const subjectReason = JSON.parse(additionalData?.httpRequest)?.data?.error;
|
const subjectReason = JSON.parse(additionalData?.httpRequest)?.data?.error;
|
||||||
smtp.send({
|
smtp.send({
|
||||||
to: config.app.reportEmail,
|
to: `${config.app.reportEmail}, ${emailUser.email}`,
|
||||||
replyTo: emailUser.email,
|
|
||||||
subject:
|
subject:
|
||||||
'[Support-Salix] ' +
|
'[Support-Salix] ' +
|
||||||
additionalData?.frontPath + ' ' +
|
additionalData?.frontPath + ' ' +
|
||||||
|
|
Loading…
Reference in New Issue