Closed Interfud closed 6 months ago
You are right. I have just set up a Gmail account as a test and was confronted with the same error. The error message also refers to the problem.
Application-specific password required.
For more information, go to https://support.google.com/mail/?p=InvalidSecondFactor
I followed the instructions and created an app-specific password and saved it in the Pi.Alert Config. After that everything worked as it should. Unfortunately, I cannot explain why this effect occurred with the update.
How to set this up in the config? Thanks!
Create & use app passwords Important: To create an app password, you need 2-Step Verification on your Google Account.
If you use 2-Step-Verification and get a "password incorrect" error when you sign in, you can try to use an app password.
Set password in Pi.Alert
SMTP_PASS = 'YOUR 16-CHARACTER CODE'
Thanks!
Test Reporting... Sending report by email... Traceback (most recent call last): File "/root/pialert/back/pialert_reporting_test.py", line 308, in sys.exit(main()) ^^^^^^ File "/root/pialert/back/pialert_reporting_test.py", line 91, in main res = sending_notifications_test('noti_Timerstop') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/pialert/back/pialert_reporting_test.py", line 128, in sending_notifications_test send_email (notiMessage, notiMessage) File "/root/pialert/back/pialert_reporting_test.py", line 274, in send_email smtp_connection.login (SMTP_USER, escaped_password) File "/usr/lib/python3.11/smtplib.py", line 750, in login raise last_exception File "/usr/lib/python3.11/smtplib.py", line 739, in login (code, resp) = self.auth( ^^^^^^^^^^ File "/usr/lib/python3.11/smtplib.py", line 662, in auth raise SMTPAuthenticationError(code, resp) smtplib.SMTPAuthenticationError: (534, b'5.7.9 Application-specific password required. For more information, go to\n5.7.9 https://support.google.com/mail/?p=InvalidSecondFactor w11-20020a056512098b00b0050e8ea87dcesm1401366lft.169 - gsmtp')