我正在尝试连接到远程SMTP服务器,但是我不断收到以下错误消息:
rejectedErrors:
[ { Error: Recipient command failed: 550 No such domain at this location
at SMTPConnection._formatError (/var/app/current/node_modules/nodemailer/lib/smtp-connection/index.js:605:19)
at SMTPConnection._actionRCPT (/var/app/current/node_modules/nodemailer/lib/smtp-connection/index.js:1416:24)
at SMTPConnection._responseActions.push.str (/var/app/current/node_modules/nodemailer/lib/smtp-connection/index.js:1383:30)
at SMTPConnection._processResponse (/var/app/current/node_modules/nodemailer/lib/smtp-connection/index.js:764:20)
at SMTPConnection._onData (/var/app/current/node_modules/nodemailer/lib/smtp-connection/index.js:570:14)
at Socket._socket.on.chunk (/var/app/current/node_modules/nodemailer/lib/smtp-connection/index.js:522:47)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
at readableAddChunk (_stream_readable.js:250:11)
at Socket.Readable.push (_stream_readable.js:208:10)
at TCP.onread (net.js:597:20)
code: 'EENVELOPE',
response: '550 No such domain at this location',
responseCode: 550,
command: 'RCPT TO',
recipient: 'testAccount1234@yahoo.com' } ] }
我的配置对象设置为:
mailConfig = {
pool: true,
maxConnections: maxConnections,
maxMessages: maxMessages,
rateDelta: rateDelta * 1000,
rateLimit: maxMessages * maxConnections,
secure: false,
ignoreTLS: true,
logger:true,
debug:true,
// Mail server host to send mail through
host: config.SMTP_Host,
// Mail server port
port: config.SMTP_Port,
};
// Mail server authentication
if(config.SMTP_User && config.SMTP_Password){
mailConfig.auth = {
user: config.SMTP_User,
pass: config.SMTP_Password
}
}
研究此错误使我进入了发件人验证的主题,并想知道nodemailer是否正在尝试使用我未设置的服务器验证某些内容。不幸的是,服务器的内部工作方式对我来说还是个谜,因为我没有对其进行设置,也无法在不通过电子邮件发送给他人的情况下更改其配置。因此,我希望为他们指明正确的方向。