diff --git a/back/methods/osticket/sendToSupport.js b/back/methods/osticket/sendToSupport.js
index dabd35f80e..55ac65635b 100644
--- a/back/methods/osticket/sendToSupport.js
+++ b/back/methods/osticket/sendToSupport.js
@@ -33,25 +33,52 @@ module.exports = Self => {
const emailUser =
await Self.app.models.EmailUser.findById(userId, {fields: ['email']});
- let html = `
Motivo: ${reason}
`;
- html += `Usuario: ${userId} ${emailUser.email}
`;
- html += `Additional Data:
`;
- html += '';
+ const tableStyle = 'width:100%; border-collapse: collapse; text-align: left;';
+ const thStyle = 'padding: 8px; border: 1px solid #ddd; background-color: #f4f4f4;';
+ const tdStyle = 'padding: 8px; border: 1px solid #ddd;';
+ const tdBoldStyle = 'padding: 8px; border: 1px solid #ddd; font-weight: bold;';
+ const subTdStyle = 'padding: 6px; border: 1px solid #ddd;';
+ const subTdBoldStyle = 'padding: 6px; border: 1px solid #ddd; font-weight: bold;';
+
+ let html = `
+ Motivo: ${reason}
+ Usuario: ${userId} ${emailUser.email}
+ Additional Data:
+
+
+
+ Clave | Valor |
+
+ `;
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 += '
';
+ if (key !== 'config') {
+ html += `
+ ${key} |
+ ${parse(val)} |
+
`;
+ } else {
+ html += `
+ ${key} |
+
+
+ `;
+ for (const [confKey, confVal] of Object.entries(val)) {
+ html += `
+ ${confKey} |
+ ${parse(confVal)} |
+ `;
+ }
+ html += ` |
`;
}
}
- html += '';
+ html += `
`;
const {message, path, name} = additionalData;
+ const err = name && message ? `${name}: ${message}` : name || message || '';
+
await smtp.send({
to: `${config.app.reportEmail}, ${emailUser.email}`,
- subject: `[Support-Salix] ${path} ${name}: ${message}`,
+ subject: `[Support-Salix] ${path.split('?')[0]} ${err}`,
html
});
};