Answer the question
In order to leave comments, you need to log in
NodeJS Why doesn't SMTP server work with secure option?
const fs = require('fs');
const {SMTPServer} = require('smtp-server');
const smtp = new SMTPServer({
secure: true,
key: fs.readFileSync('certs/privkey.pem'),
cert: fs.readFileSync('certs/cert.pem'),
onData,
onRcptTo,
authOptional: true,
});
function onRcptTo(address, session, callback) {
console.log("IS HERE!!!");
callback();
}
function onData(stream, session, callback) {
stream.pipe(process.stdout);
}
smtp.listen(465);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question