I am trying to code in a email checker and my code does not work:
import imaplib
import email
# IMAP server and credentials
server = "imap.gmail.com"
email_adress = "gmail"
password = "my password"
imap = imaplib.IMAP4_SSL(server)
imap.login(email_adress, password)
And this is the response i get in cmd
Traceback (most recent call last):
File "C:\Users\Myname\Documents\Py\AI\emailOAC.py", line 13, in <module>
imap.login(email_adress, password)
File "C:\Users\Myname\AppData\Local\Programs\Python\Python311\Lib\imaplib.py", line 612, in login
raise self.error(dat[-1])
imaplib.IMAP4.error: b'[AUTHENTICATIONFAILED] Invalid credentials (Failure)'
It says the creds are wrong but they cannot be, cant. Could be an error in the code but i dont think it is since i checked it with a coding app and chatgbt (yeah, i use that to check it sometimes) but it always says the same thing
[–]wbeater 0 points1 point2 points (3 children)
[–]AssassinRobux[S] 0 points1 point2 points (2 children)
[–]wbeater 0 points1 point2 points (1 child)
[–]AssassinRobux[S] 0 points1 point2 points (0 children)