My sample code block;
import imaplib
try:
userName = "[email protected]"
passwd = "***"
SMTP = "outlook.office365.com"
Port = "993"
imapSession = imaplib.IMAP4_SSL(SMTP, Port)
imapSession.login(userName, passwd)
except Exception as e:
print(e)
Return: error: b'LOGIN failed.'
I'm sure my email and password are correct. Microsoft Office 365 announced that it is shutting down imap protocol communications. How can I do my mail reading operations via office 365?
CodePudding user response:
They are not shitting down IMAP4. They are disabling Basic Authentication - you need to use OAuth.