0

I am having problems when I do a looped call to Mailer send email function.I am testing sending of over 50 emails and the most number of successfully sent were 30 so far. The rest is stopped by the following errors. I redacted the complete email address for the robot for privacy reasons.

[2018-09-03 05:18:32] INFO [0rULO04aig] User "xxx.robot@xxxxxx.com" authenticated

[2018-09-03 05:18:32] INFO [#1] Sending message <3299d22a-e0c8-00b8-4f7d-4d0455f85b31@xxxxx.com> using #1 to

[2018-09-03 05:18:32] DEBUG [0rULO04aig] C: MAIL FROM:

[2018-09-03 05:18:32] DEBUG [PFhdqz3yHs] S: 250 2.1.0 OK v72-v6sm36109733pfj.22 - gsmtp

[2018-09-03 05:18:32] DEBUG [PFhdqz3yHs] C: RCPT TO:

[2018-09-03 05:18:32] DEBUG [0rULO04aig] S: 250 2.1.0 OK v186-v6sm24113856pgd.25 - gsmtp

[2018-09-03 05:18:32] DEBUG [0rULO04aig] C: RCPT TO:

[2018-09-03 05:18:32] DEBUG [PFhdqz3yHs] S: 250 2.1.5 OK v72-v6sm36109733pfj.22 - gsmtp

[2018-09-03 05:18:32] DEBUG [PFhdqz3yHs] C: DATA

[2018-09-03 05:18:32] DEBUG [BlXN9zcX8Ak] S: 421 4.7.0 Temporary System Problem. Try again later (10). x65-v6sm28504837pfk.140 - gsmtp

[2018-09-03 05:18:32] DEBUG [BlXN9zcX8Ak] Closing connection to the server using "end"

[2018-09-03 05:18:32] INFO [#1] Connection #1 was closed

[2018-09-03 05:18:32] ERROR [#1] Pool Error for #1: Data command failed: 421 4.7.0 Temporary System Problem. Try again later (10). x65-v6sm28504837pfk.140 - gsmtp

[2018-09-03 05:18:32] ERROR Send Error: Data command failed: 421 4.7.0 Temporary System Problem. Try again later (10). x65-v6sm28504837pfk.140 - gsmtp

[2018-09-03 05:18:32] DEBUG [gflzBwS1fc] S: 421 4.7.0 Temporary System Problem. Try again later (10). b203-v6sm1382852pfb.174 - gsmtp

I am unable to post the complete code since the checker here keeps telling me that it is not properly formatted. The code follows ESLint rules.

Let me post a pseudocode:

forEach(users, key) =>
    getSQL
       create Users if no result found
         sendEmail(user)

So the settings:

function Mailer(options) {
  this.options = options;
  that = this;
  this.transporter = nodemailer.createTransport({
    pool: true,
    maxConnections: 50,
    maxMessages: Infinity,
    debug: true,
    logger: true,
    connectionTimeout: 3000,
    host: config.mail.host,
    port: config.mail.port,
        secure: false,
        auth: {
          user: config.mail.username,
          pass: config.mail.password,
        },
  });
}
noob_coder
  • 21
  • 1
  • 9

0 Answers0