= { '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }
+ return map[c] ?? c
+ })
+
+ await transporter.sendMail({
+ from: `"Portfolio" <${config.smtpUser}>`,
+ to: config.smtpTo,
+ subject: `Contact portfolio - ${name}`,
+ text: `De: ${name} <${email}>\n\n${message}`,
+ html: `De: ${escapedName} <${email}>
${escapedMessage.replace(/\n/g, '
')}
`,
+ })
+
+ return { success: true }
+})