eyalzek / price-alert

Script to send an email when a price drops below a given value (tested on Amazon).
78 stars 34 forks source link

gmail configuration (US) #11

Closed jackdhaliwal closed 4 years ago

jackdhaliwal commented 4 years ago

Great little script! Just wanted to give a heads up for email config for use in gmail (US). I repeatedly received smtp related errors, even though other code examples seemed to match your code. The errors included "failed to login" (your logger code) as well as "smtplib.SMTPServerDisconnected: Connection unexpectedly closed", along with a few others.

Resolution: Going into gmail settings (https://myaccount.google.com/lesssecureapps) and turning this feature to 'ON'.

This may save future users some time if configuring with gmail (US) at the very least. Other than that, like the script and plan to modify it to fit my needs. Cheers!

eyalzek commented 4 years ago

I'm using gmail and I'm not experiencing this issue. Do you have 2FA enabled and using an app password, or are you using your actual account password?

jackdhaliwal commented 4 years ago

2FA is not enabled and I am using the account password. Note that this was apparent when I initially tried to send the email. It is also a gmail account (new created for the purpose of using this tool)

eyalzek commented 4 years ago

So then it sort of makes sense :) I would recommend enabling 2FA, but regardless, feel free to submit a PR adding this information to the readme.

jackdhaliwal commented 4 years ago

Correct: By default however, 2FA will not be enabled in most cases. Will submit PR. Thanks!