title: Getting error in Nodemailer if recipient email is wrong
body: <p>I am sending an email With Nodemailer SMTP</p>
  
  <p>Its working fine if email account is valid / existing, But getting an 500 error when entering email address whic is not exist.</p>
  
  <p>I know it is not sending because email not exist but need to handle errors</p>
  
  <p>I have also tried <code>tls: {rejectUnauthorized: false},</code> but getting same issue</p>
  
  <p>I am using Custom SMTP not using Gmail SMTP</p>
  
  <p>My code is as below:</p>
  
  <pre><code>let transporter = nodemailer.createTransport({
                  host: 'smtp.myhost.de',
                  port: 587,
                  auth: {
                    user: 'CUSTOM_SMTP_EMAIL', // generated ethereal user
                    pass: 'CUSTOM_SMTP_PASS' // generated ethereal password
                  },
                  secure:false,
                  requireTLS: false,
                  tls: {rejectUnauthorized: false},
                  debug:true
                });
  
  
  
  let info = await transporter.sendMail({
                  from: sails.config.custom.appName+ SENDER_EMAIL, // sender address
                  to: inputs.email, // list of receivers
                  subject: "My email subject ", // Subject line
                  text: "Verify Email Address "+inputs.email, // plain text body
                  html: html // html body
                },function(err) {
                  console.log('email sent');
  
                  if (err){
                      console.log( 'err-&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;', err);
                      return exits.success('error');
  
                  } else {
                     console.log('success');
                     return exits.success('success');
                  }
                });
  </code></pre>
  
  <p>I am not able to return <code>return exits.success('error');</code> because of 500 error.</p>
  
  <p>Getting below error</p>
  
  <p>err->>>>>>>>>>>>> </p>
  
  <pre><code>{ Error: Can't send mail - all recipients were rejected: 552 5.2.2 host gmail-smtp-in.l.google.com [2a00:1450:400c:c09::1a] said: The email account that you tried to reach is over quota. Please direct the recipient to https://support.google.com/mail/?p=OverQuotaPerm q13si8918761wrn.204 - gsmtp (H-QUOTA)
      at SMTPConnection._formatError (/var/www/html/node_modules/nodemailer/lib/smtp-connection/index.js:784:19)
      at SMTPConnection._actionRCPT (/var/www/html/node_modules/nodemailer/lib/smtp-connection/index.js:1613:28)
      at SMTPConnection._responseActions.push.str (/var/www/html/node_modules/nodemailer/lib/smtp-connection/index.js:1566:30)
      at SMTPConnection._processResponse (/var/www/html/node_modules/nodemailer/lib/smtp-connection/index.js:942:20)
      at SMTPConnection._onData (/var/www/html/node_modules/nodemailer/lib/smtp-connection/index.js:749:14)
      at TLSSocket.SMTPConnection._onSocketData.chunk (/var/www/html/node_modules/nodemailer/lib/smtp-connection/index.js:195:44)
      at emitOne (events.js:116:13)
      at TLSSocket.emit (events.js:211:7)
      at addChunk (_stream_readable.js:263:12)
      at readableAddChunk (_stream_readable.js:250:11)
      at TLSSocket.Readable.push (_stream_readable.js:208:10)
      at TLSWrap.onread (net.js:607:20)
    code: 'EENVELOPE',
    response: '552 5.2.2 host gmail-smtp-in.l.google.com [2a00:1450:400c:c09::1a] said: The email account that you tried to reach is over quota. Please direct the recipient to https://support.google.com/mail/?p=OverQuotaPerm q13si8918761wrn.204 - gsmtp (H-QUOTA)',
    responseCode: 552,
    command: 'RCPT TO',
    rejected: [ 'jay@gmail.com' ],
    rejectedErrors:
     [ { Error: Recipient command failed: 552 5.2.2 host gmail-smtp-in.l.google.com [2a00:1450:400c:c09::1a] said: The email account that you tried to reach is over quota. Please direct the recipient to https://support.google.com/mail/?p=OverQuotaPerm q13si8918761wrn.204 - gsmtp (H-QUOTA)
      at SMTPConnection._formatError (/var/www/html/node_modules/nodemailer/lib/smtp-connection/index.js:784:19)
      at SMTPConnection._actionRCPT (/var/www/html/node_modules/nodemailer/lib/smtp-connection/index.js:1599:24)
      at SMTPConnection._responseActions.push.str (/var/www/html/node_modules/nodemailer/lib/smtp-connection/index.js:1566:30)
      at SMTPConnection._processResponse (/var/www/html/node_modules/nodemailer/lib/smtp-connection/index.js:942:20)
      at SMTPConnection._onData (/var/www/html/node_modules/nodemailer/lib/smtp-connection/index.js:749:14)
      at TLSSocket.SMTPConnection._onSocketData.chunk (/var/www/html/node_modules/nodemailer/lib/smtp-connection/index.js:195:44)
      at emitOne (events.js:116:13)
      at TLSSocket.emit (events.js:211:7)
      at addChunk (_stream_readable.js:263:12)
      at readableAddChunk (_stream_readable.js:250:11)
      at TLSSocket.Readable.push (_stream_readable.js:208:10)
      at TLSWrap.onread (net.js:607:20)
         code: 'EENVELOPE',
         response: '552 5.2.2 host gmail-smtp-in.l.google.com [2a00:1450:400c:c09::1a] said: The email account that you tried to reach is over quota. Please direct the recipient to https://support.google.com/mail/?p=OverQuotaPerm q13si8918761wrn.204 - gsmtp (H-QUOTA)',
         responseCode: 552,
         command: 'RCPT TO',
         recipient: 'jay@gmail.com' } ] }
  </code></pre>