Code réutilisable de nodemailer 1
router.get('/email', async (req, res) => {
try {
await EmailSender.sendMessage(
'[email protected]',
'Hello world',
'test',
'<h1>Test</h1>'
)
return res.status(200).send('Successfully sent email.')
} catch (exception) {
return res.status(500).send(exception.message)
}
})
Talented Tarantula