mandatoryprogrammer / mandatoryprogrammer/xsshunter-express

Not receiving email notification on gmail

Open
#37 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
2.4k
Forks
428
PR merge metrics
No merged PRs in 30d

Description

Hi,

I have edited the settings as below

- SMTP_EMAIL_NOTIFICATIONS_ENABLED=true
- SMTP_HOST=smtp.gmail.com
- SMTP_PORT=465
- SMTP_USE_TLS=true
- SMTP_USERNAME=YourEmail@gmail.com
- SMTP_PASSWORD=YourEmailPassword
- SMTP_FROM_EMAIL=YourEmail@gmail.com
- SMTP_RECEIVER_EMAIL=YourEmail@gmail.com
I'm getting an error like below

xsshunterexpress_1 | (node:29) UnhandledPromiseRejectionWarning: Error: Invalid login: 535-5.7.8 Username and Password not accepted. Learn more at
xsshunterexpress_1 | 535 5.7.8 https://support.google.com/mail/?p=BadCredentials x14-20020a170902a38e00b001b8b2b95068sm9112067pla.204 - gsmtp
xsshunterexpress_1 | at SMTPConnection._formatError (/app/node_modules/nodemailer/lib/smtp-connection/index.js:774:19)
xsshunterexpress_1 | at SMTPConnection._actionAUTHComplete (/app/node_modules/nodemailer/lib/smtp-connection/index.js:1513:34)
xsshunterexpress_1 | at SMTPConnection. (/app/node_modules/nodemailer/lib/smtp-connection/index.js:540:26)
xsshunterexpress_1 | at SMTPConnection._processResponse (/app/node_modules/nodemailer/lib/smtp-connection/index.js:932:20)
xsshunterexpress_1 | at SMTPConnection._onData (/app/node_modules/nodemailer/lib/smtp-connection/index.js:739:14)
xsshunterexpress_1 | at TLSSocket.SMTPConnection._onSocketData (/app/node_modules/nodemailer/lib/smtp-connection/index.js:189:44)
xsshunterexpress_1 | at TLSSocket.emit (events.js:314:20)
xsshunterexpress_1 | at addChunk (_stream_readable.js:297:12)
xsshunterexpress_1 | at readableAddChunk (_stream_readable.js:272:9)
xsshunterexpress_1 | at TLSSocket.Readable.push (_stream_readable.js:213:10)
xsshunterexpress_1 | (node:29) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)

I have checked in the forums it is mentioned that Gmail SMTP port: 465 (SSL) or 587 (TLS), so I changed to 587, I got the below message.

xsshunterexpress_1 | (node:30) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
xsshunterexpress_1 | (node:30) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the SMTP environment variables in the issue and the Nodemailer SMTP connection shown in the stack trace; inspect the email notification entry point and how rejected authentication promises are handled. Reproduce the Gmail configuration and determine whether the intended fix is configuration guidance or a code change, with successful notification delivery and no unhandled rejection as the completion criteria.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.