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

Email notifier doesn't work with Gmail app password (both SSL on 465 and TLS on 587) #320

Open
melo0187 opened this issue Feb 2, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@melo0187
Copy link

melo0187 commented Feb 2, 2023

Describe the bug
I want to set up notifications, but the email notifier doesn't work with my Gmail account. I have 2-Step Verification set up in Gmail, which is why I set up an app password. However, both combinations of secure=true with port 465 and secure=false with port 587 always end with the same error.

Screenshots or Logs

> [email protected] entrypoint-config
> node dist/src/entrypoint-config.jsSetting
timezone: Europe/Berlin
Run on startup: true
[2023-02-02 11:52:05.000 +0100] INFO: Started epicgames-freegames-node    
	COMMIT_SHA: "5fc6de6ce0306d51e1867b10e76e9dbd1343faa0"
	BRANCH: "master"    
	DISTRO: "alpine"
[2023-02-02 11:52:05.523 +0100] INFO: Testing all configured notifiers
[2023-02-02 11:52:07.214 +0100] ERROR: Error sending email. Please check your configuration    
	user: "***@gmail.com"    
	reason: "TEST"    
	emailConfig: {      
		"type": "email",      
		"secure": false,
		"smtpHost": "smtp.gmail.com",
		"smtpPort": 587,
		"emailSenderAddress": "***@gmail.com",
		"emailSenderName": "Epic Games Captchas",
		"emailRecipientAddress": "***@gmail.com"
	}
[2023-02-02 11:52:07.214 +0100] ERROR: Mail command failed: 530-5.7.0 Authentication Required. Learn more at
530 5.7.0  https://support.google.com/mail/?p=WantAuthError f8-20020a05600c44c800b003dc433bb5e1sm4333056wmo.9 - gsmtp
	err: {
		"type": "Error",
		"message": "Mail command failed: 530-5.7.0 Authentication Required. Learn more at\n530 5.7.0  https://support.google.com/mail/?p=WantAuthError f8-20020a05600c44c800b003dc433bb5e1sm4333056wmo.9 - gsmtp",
		"stack":
			Error: Mail command failed: 530-5.7.0 Authentication Required. Learn more at
			530 5.7.0  https://support.google.com/mail/?p=WantAuthError f8-20020a05600c44c800b003dc433bb5e1sm4333056wmo.9 - gsmtp
				at SMTPConnection._formatError (/usr/app/node_modules/nodemailer/lib/smtp-connection/index.js:784:19)
				at SMTPConnection._actionMAIL (/usr/app/node_modules/nodemailer/lib/smtp-connection/index.js:1566:34)
				at SMTPConnection. (/usr/app/node_modules/nodemailer/lib/smtp-connection/index.js:1041:18)
				at SMTPConnection._processResponse (/usr/app/node_modules/nodemailer/lib/smtp-connection/index.js:947:20)
				at SMTPConnection._onData (/usr/app/node_modules/nodemailer/lib/smtp-connection/index.js:749:14)
				at TLSSocket.SMTPConnection._onSocketData (/usr/app/node_modules/nodemailer/lib/smtp-connection/index.js:189:44)
				at TLSSocket.emit (node:events:513:28)
				at addChunk (node:internal/streams/readable:324:12)
				at readableAddChunk (node:internal/streams/readable:297:9)
				at TLSSocket.Readable.push (node:internal/streams/readable:234:10)
		"code": "EENVELOPE", 
		"response": "530-5.7.0 Authentication Required. Learn more at\n530 5.7.0  https://support.google.com/mail/?p=WantAuthError f8-20020a05600c44c800b003dc433bb5e1sm4333056wmo.9 - gsmtp",
		"responseCode": 530,
		"command": "MAIL FROM"
	}
[2023-02-02 11:52:07.218 +0100] WARN: Current version
	COMMIT_SHA: "5fc6de6ce0306d51e1867b10e76e9dbd1343faa0"
	BRANCH: "master"
	DISTRO: "alpine"

Additional context
I looked up the error code at Google Support, see here.

530, "5.7.0", Must issue a STARTTLS command first.

Don't think I can do anything about this on my site.

Would be happy to help debug the issue and hope you find the time to look into it.

@melo0187 melo0187 added the bug Something isn't working label Feb 2, 2023
@johnSaunders99
Copy link

587 is for STARTTLS, try with port 456. and be sure your smtp service is enable in google mail setting

@johnSaunders99
Copy link

BTW, you should set secure to true if you re using the google mail to notify

@melo0187
Copy link
Author

587 is for STARTTLS, try with port 456. and be sure your smtp service is enable in google mail setting

Did you mean port 465? As stated in my original post I already tested port 465 with secure set to true, but without success.
Since I stopped using google mail, I simply moved on to Gotify, which works like a charm =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants