diff --git a/back/methods/osticket/sendToSupport.js b/back/methods/osticket/sendToSupport.js
index d05f1a82e..dabd35f80 100644
--- a/back/methods/osticket/sendToSupport.js
+++ b/back/methods/osticket/sendToSupport.js
@@ -32,21 +32,23 @@ module.exports = Self => {
const userId = ctx.req.accessToken.userId;
const emailUser =
await Self.app.models.EmailUser.findById(userId, {fields: ['email']});
- const {code, message, path, request, status, statusText, config: errConfig, name} = additionalData;
let html = `
Motivo: ${reason}
`;
html += `Usuario: ${userId} ${emailUser.email}
`;
html += `Additional Data:
`;
- html += `- Code: ${code}
`;
- html += `- Message: ${message}
`;
- html += `- Path: ${path}
`;
- html += `- Request: ${request}
`;
- html += `- Status: ${status}
`;
- html += `- StatusText: ${statusText}
`;
- html += `- Config:
`;
- for (const [key, val] of Object.entries(errConfig)) html += `- ${key}: ${parse(val)}
`;
- html += '
';
+ html += '';
+ for (const [key, val] of Object.entries(additionalData)) {
+ if (key !== 'config') html += `- ${key}: ${parse(val)}
`;
+ else {
+ html += `- ${key}:
`;
+ for (const [confKey, confVal] of Object.entries(val))
+ html += `- ${confKey}: ${parse(confVal)}
`;
+ html += '
';
+ }
+ }
+ html += '
';
+ const {message, path, name} = additionalData;
await smtp.send({
to: `${config.app.reportEmail}, ${emailUser.email}`,
subject: `[Support-Salix] ${path} ${name}: ${message}`,