Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mail Tester causes service crash if failed #37

Open
jacksondaw opened this issue Oct 19, 2020 · 0 comments
Open

Mail Tester causes service crash if failed #37

jacksondaw opened this issue Oct 19, 2020 · 0 comments

Comments

@jacksondaw
Copy link

If the server is misconfigured the mail tester causes a crash, because result is undefined.

logger.info('Mail tester error!', result.result);


{"level":"info","message":"connecting to db"}
(node:1) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
(Use `node --trace-deprecation ...` to show where the warning was created)
{"message":"Connected successfully to mongodb server","level":"info"}
{"message":"starting smtp on 25","level":"info"}
{"message":"API server listening","level":"info"}
{"message":"::ffff:10.175.153.38 - GET /api/alive HTTP/1.1 200 49 - 9.768 ms -\n","level":"info"}
{"message":"SMTP Connect from 127.0.0.1","level":"info"}
(node:1) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
/app/server/app/mailTester.js:61
      logger.info('Mail tester error!', result.result);
                                        ^
ReferenceError: result is not defined
    at /app/server/app/mailTester.js:61:41
    at /app/node_modules/nodemailer/lib/mailer/index.js:226:21
    at /app/node_modules/nodemailer/lib/smtp-transport/index.js:239:32
    at callback (/app/node_modules/nodemailer/lib/smtp-connection/index.js:435:13)
    at /app/node_modules/nodemailer/lib/smtp-connection/index.js:445:24
    at SMTPConnection._actionMAIL (/app/node_modules/nodemailer/lib/smtp-connection/index.js:1370:20)
    at SMTPConnection.<anonymous> (/app/node_modules/nodemailer/lib/smtp-connection/index.js:857:18)
    at SMTPConnection._processResponse (/app/node_modules/nodemailer/lib/smtp-connection/index.js:764:20)
    at SMTPConnection._onData (/app/node_modules/nodemailer/lib/smtp-connection/index.js:570:14)
    at TLSSocket.<anonymous> (/app/node_modules/nodemailer/lib/smtp-connection/index.js:710:55)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant