Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Nodemailer Reuseable Code 1

router.get('/email', async (req, res) => {
    try {
        await EmailSender.sendMessage(
            'bijaya@bijaya.com',
            'Hello world',
            'test',
            '<h1>Test</h1>'
        )

        return res.status(200).send('Successfully sent email.')
    } catch (exception) {
        return res.status(500).send(exception.message)
    }
})
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Nodemailer #Reuseable #Code
ADD COMMENT
Topic
Name
2+6 =