How can I create a custom smtp server to send out notification emails in Nodejs?
问题 My requirement is to send a notification email from my application to any email id , eg: a gmail address. I went through some modules like the smtp-server ,smtp-connection and emailjs This is what I have got till now. var SMTPServer = require('smtp-server').SMTPServer var server = new SMTPServer({ name: 'testDomain.com', authOptional: true, onAuth: function (auth, session, callback) { callback(null, {user: 'sample-user'}) } }) server.on('error', function (err) { console.log('Error %s', err