# IMAP connection failed: LOGIN failed.
# Symptoms

1. The email address for the email channel is serviced by office365.com (Exchange Online)
2. When setting up incoming mail retrieval via IMAP, the error is: `LOGIN failed.`

# Solution

You can set up incoming mail collection via [SMTP transfer](https://support.swarmica.com/article/ru/1624-kak-nastroit-smtp-kanal-dlya-pochty-v-swarmica.html) instead of IMAP

# Reason

Microsoft has removed the ability to authorize via Basic Auth in Exchange Online:

[https://learn.microsoft.com/en-us/answers/questions/1130148/outlook-imap-login-failed-using-python](https://learn.microsoft.com/en-us/answers/questions/1130148/outlook-imap-login-failed-using-python)