const nodemailer = require(\'nodemailer\');
const SMTPServer = require(\"smtp-server\").SMTPServer;
const server = new SMTPServer({
onAuth(auth, session, callb
I think you might simply be queuing the email in your instance of smtp-server
and not actually sending it.
The documentation for smtp-server begins with a note about how this module does not actually send emails by itself:
This module does not make any email deliveries by itself.
smtp-server
allows you to listen on ports 25/24/465/587 etc. using SMTP or LMTP protocol and that’s it. Your own application is responsible of accepting and delivering the message to destination.
You will need to use the SMTP client module smtp-connection in conjunction with your SMTP server to send the email.
You can see where the "250 OK: message queued" response is coming from at this line in the server module's code.
For who came with this same issue but using the Nodemailer's transporter
way, I solved this issue adding the name
of the server into the transporter object.
const transportObj = {
name: credentials.host, // in my case, the host and the name are the same
host: credentials.host,
port: credentials.port,
secure: true,
auth: {
user: credentials.user,
pass: credentials.pass
},
}
const transporter = nodemailer.createTransport(transportObj)
transporter.sendMail(...)
This solution was related here