refs #5941 fix(sendToSupport): add as a collaborator
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2023-08-21 14:48:05 +02:00
parent 36623c1cae
commit 14d4de0e1f
2 changed files with 3 additions and 7 deletions

View File

@ -40,9 +40,7 @@ module.exports = Self => {
const subjectReason = JSON.parse(additionalData?.httpRequest)?.data?.error;
smtp.send({
to: config.app.reportEmail,
from: emailUser.email,
replyTo: emailUser.email,
to: `${config.app.reportEmail}, ${emailUser.email}`,
subject:
'[Support-Salix] ' +
additionalData?.frontPath + ' ' +

View File

@ -9,7 +9,7 @@ module.exports = {
},
async send(options) {
options.from = options.from ?? `${config.app.senderName} <${config.app.senderEmail}>`;
options.from = `${config.app.senderName} <${config.app.senderEmail}>`;
const env = process.env.NODE_ENV;
const canSend = env === 'production' || !env || options.force;
@ -19,10 +19,8 @@ module.exports = {
return Promise.resolve(true);
}
if (!env) {
if (!env)
options.to = config.app.senderEmail;
options.from = `${config.app.senderName} <${config.app.senderEmail}>`;
}
let res;
let error;