nodejs smtp-server Email gets sent but not received

后端 未结 2 1495
广开言路
广开言路 2021-01-15 14:42
const nodemailer = require(\'nodemailer\');

const SMTPServer = require(\"smtp-server\").SMTPServer;

const server = new SMTPServer({
    onAuth(auth, session, callb         


        
2条回答
  •  北恋
    北恋 (楼主)
    2021-01-15 15:19

    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.

提交回复
热议问题