refs #5941 fix(sendToSupport): add as a collaborator
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
36623c1cae
commit
14d4de0e1f
|
@ -40,9 +40,7 @@ module.exports = Self => {
|
||||||
|
|
||||||
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}`,
|
||||||
from: emailUser.email,
|
|
||||||
replyTo: emailUser.email,
|
|
||||||
subject:
|
subject:
|
||||||
'[Support-Salix] ' +
|
'[Support-Salix] ' +
|
||||||
additionalData?.frontPath + ' ' +
|
additionalData?.frontPath + ' ' +
|
||||||
|
|
|
@ -9,7 +9,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
|
|
||||||
async send(options) {
|
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 env = process.env.NODE_ENV;
|
||||||
const canSend = env === 'production' || !env || options.force;
|
const canSend = env === 'production' || !env || options.force;
|
||||||
|
|
||||||
|
@ -19,10 +19,8 @@ module.exports = {
|
||||||
return Promise.resolve(true);
|
return Promise.resolve(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!env) {
|
if (!env)
|
||||||
options.to = config.app.senderEmail;
|
options.to = config.app.senderEmail;
|
||||||
options.from = `${config.app.senderName} <${config.app.senderEmail}>`;
|
|
||||||
}
|
|
||||||
|
|
||||||
let res;
|
let res;
|
||||||
let error;
|
let error;
|
||||||
|
|
Loading…
Reference in New Issue