Sending ejs template using nodemailer
问题 I'm trying to build a web application using express.js. In my application, I'm using nodemailer for sending mail. If I just use it to send basic mail it work ok; however, when I try to use nodemailer to send a rendered ejs file, the recipient only receive an empty mail. So here the details of my code: var transporter = nodemailer.createTransport({ host: 'smtp.zoho.com', port: 465, secure: true, // use SSL auth: { user: 'testmail@zoho.com', pass: '123456' } }); fs.readFile('/test.ejs', 'utf8',