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

Not receiving email notification on gmail #37

Open
sagar0121 opened this issue Aug 22, 2023 · 4 comments
Open

Not receiving email notification on gmail #37

sagar0121 opened this issue Aug 22, 2023 · 4 comments

Comments

@sagar0121
Copy link

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
  - [email protected]
  - SMTP_PASSWORD=YourEmailPassword
  - [email protected]
  - [email protected]

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.

@Smorgashboard
Copy link

Did you ever get this to work? I'm in the same boat and have tried every combination of gmail relay server with tls and no tls i can think of.

@sheltyy
Copy link

sheltyy commented Dec 6, 2023

If you are getting the "Connection Timed Out" error than it is very likely that your VPS provider is blocking out port 465

@nikokosm
Copy link

nikokosm commented Jan 2, 2024

For anyone having this issue, Google has changed some things in the authentication part and you need to use an app password instead of your account's password. After that, the notifications will work fine. More info on how to do it can be found here https://support.google.com/accounts/answer/185833

PS: No need to change your ports in the config file - the default works fine

@adamjsturge
Copy link

@sagar0121 @Smorgashboard I added more notification services in my rewrite https://github.com/adamjsturge/xsshunter-go feel free to check it out, email should also work but I find discord, slack, and telegram more convenient.

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

5 participants