feat: refs #8571 enhance email formatting in sendToSupport function with structured HTML table #3445
No reviewers
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: verdnatura/salix#3445
Loading…
Reference in New Issue
No description provided.
Delete Branch "8571-hotfix-notShowToken"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -37,3 +36,1 @@
html += `<h3>Usuario: ${userId} ${emailUser.email}</h3>`;
html += `<h3>Additional Data:</h3>`;
html += '<ul>';
const tableStyle = 'width:100%; border-collapse: collapse; text-align: left;';
ChatGPT 15-20 min. Resultado en un comentario de la tarea. He aprovechado para cambiarlo porque queda bastante más legible y era algo rápido.
@ -50,2 +74,4 @@
html += `</tbody></table>`;
const {message, path, name} = additionalData;
const err = name && message ? `${name}: ${message}` : name || message || '';
Así, no pondrá nunca undefined: undefined o undefined: mi mensaje de error...
@ -52,3 +79,3 @@
await smtp.send({
to: `${config.app.reportEmail}, ${emailUser.email}`,
subject: `[Support-Salix] ${path} ${name}: ${message}`,
subject: `[Support-Salix] ${path.split('?')[0]} ${err}`,
Tras lo hablado con Satorres, hemos quedado que los query-params molestan en el asunto del cau, en el mensaje se pueden ver pero en el asunto solo se ve el path (#/item/fixed-price) .