I am trying to configure my Office 365 email account in ERPNext, but I keep receiving the following error:
**Error connecting via IMAP/POP3: b'* OK The Microsoft Exchange IMAP4 service is ready...'**
I have already:
- Entered the email ID and App Password (generated from Microsoft 365).
- Verified the IMAP/SMTP settings (hostnames and ports are correct).
- Confirmed that the credentials are correct and working in other clients.
Despite this, the connection fails during setup in ERPNext.
Could you please guide me on how to resolve this?
Error
Please check your email login credentials. smtplib.SMTPAuthenticationError: (535, b’5.7.8 Username and Password not accepted. For more information, go to\n5.7.8 Can't sign in to your Google Account - Google Account Help 98e67ed59e1d1-3254aa713a4sm21040a91.27 - gsmtp’)