Nodemailer-收件人地址被拒绝:超出配额

时间:2018-07-24 11:18:36

标签: node.js firebase google-cloud-functions nodemailer

我在使用nodemailer时遇到问题-我在Firebase中的Cloud Functions中使用了它,在创建数据后,我发送了电子邮件确认(我使用的是Blaze计划,所以这不是问题)。它已经工作了两天,突然间:

{ Error: Can't send mail - all recipients were rejected: 554 5.7.1 <abc@gmail.com>: Recipient address rejected: Quota exceeded (number of mails in total)
    at SMTPConnection._formatError (/user_code/node_modules/nodemailer/lib/smtp-connection/index.js:606:19)
    at SMTPConnection._actionRCPT (/user_code/node_modules/nodemailer/lib/smtp-connection/index.js:1425:28)
    at SMTPConnection._responseActions.push.str (/user_code/node_modules/nodemailer/lib/smtp-connection/index.js:1378:30)
    at SMTPConnection._processResponse (/user_code/node_modules/nodemailer/lib/smtp-connection/index.js:762:20)
    at SMTPConnection._onData (/user_code/node_modules/nodemailer/lib/smtp-connection/index.js:558:14)
    at TLSSocket._socket.on.chunk (/user_code/node_modules/nodemailer/lib/smtp-connection/index.js:709:51)
    at emitOne (events.js:96:13)
    at TLSSocket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at TLSSocket.Readable.push (_stream_readable.js:134:10)
  code: 'EENVELOPE',
  response: '554 5.7.1 <abc@gmail.com>: Recipient address rejected: Quota exceeded (number of mails in total)',
  responseCode: 554,
  command: 'RCPT TO',
  rejected: [ 'another@gmail.com', 'abc@gmail.com' ],
  rejectedErrors: 
   [ { Error: Recipient command failed: 554 5.7.1 <another@gmail.com>: Recipient address rejected: Quota exceeded (number of mails in total)
         at SMTPConnection._formatError (/user_code/node_modules/nodemailer/lib/smtp-connection/index.js:606:19)
         at SMTPConnection._actionRCPT (/user_code/node_modules/nodemailer/lib/smtp-connection/index.js:1411:24)
         at SMTPConnection._responseActions.push.str (/user_code/node_modules/nodemailer/lib/smtp-connection/index.js:1378:30)
         at SMTPConnection._processResponse (/user_code/node_modules/nodemailer/lib/smtp-connection/index.js:762:20)
         at SMTPConnection._onData (/user_code/node_modules/nodemailer/lib/smtp-connection/index.js:558:14)
         at TLSSocket._socket.on.chunk (/user_code/node_modules/nodemailer/lib/smtp-connection/index.js:709:51)
         at emitOne (events.js:96:13)
         at TLSSocket.emit (events.js:188:7)
         at readableAddChunk (_stream_readable.js:176:18)
         at TLSSocket.Readable.push (_stream_readable.js:134:10)
       code: 'EENVELOPE',
       response: '554 5.7.1 <another@gmail.com>: Recipient address rejected: Quota exceeded (number of mails in total)',
       responseCode: 554,
       command: 'RCPT TO',
       recipient: 'another@gmail.com' },
     { Error: Recipient command failed: 554 5.7.1 <abc@gmail.com>: Recipient address rejected: Quota exceeded (number of mails in total)
         at SMTPConnection._formatError (/user_code/node_modules/nodemailer/lib/smtp-connection/index.js:606:19)
         at SMTPConnection._actionRCPT (/user_code/node_modules/nodemailer/lib/smtp-connection/index.js:1411:24)
         at SMTPConnection._responseActions.push.str (/user_code/node_modules/nodemailer/lib/smtp-connection/index.js:1378:30)
         at SMTPConnection._processResponse (/user_code/node_modules/nodemailer/lib/smtp-connection/index.js:762:20)
         at SMTPConnection._onData (/user_code/node_modules/nodemailer/lib/smtp-connection/index.js:558:14)
         at TLSSocket._socket.on.chunk (/user_code/node_modules/nodemailer/lib/smtp-connection/index.js:709:51)
         at emitOne (events.js:96:13)
         at TLSSocket.emit (events.js:188:7)
         at readableAddChunk (_stream_readable.js:176:18)
         at TLSSocket.Readable.push (_stream_readable.js:134:10)
       code: 'EENVELOPE',
       response: '554 5.7.1 <abc@gmail.com>: Recipient address rejected: Quota exceeded (number of mails in total)',
       responseCode: 554,
       command: 'RCPT TO',
       recipient: 'abc@gmail.com' } ] }

我也在Firebase控制台日志中收到此错误:Function returned undefined, expected Promise or value

功能如下:

transporter.sendMail(mailOptions, (error, info) => { // TODO should be returned
            if (error) {
                return console.log(error);
            }

            console.log('Message %s sent: %s', info.messageId, info.response);

            //move it elsewhere - maybe HTTP trigger?
            return admin.database().ref('events/' + event.data.val().eventKey).remove();

        });

0 个答案:

没有答案