seanthegeek / mailsuite

A Python package to make receiving, parsing, and sending email easier
https://seanthegeek.github.io/mailsuite/
Apache License 2.0
7 stars 9 forks source link

Only username password authentication supported #6

Open kohtala opened 3 years ago

kohtala commented 3 years ago

Google and Microsoft have closed or are closing the basic password authentication on IMAP.

The mailsuite.imap.IMAPClient seems to unconditionally use basic username password login.

But the base IMAPClient support also other authentication methods.

Fixing this could be as simple as making the username and password parameters optional and letting the user authenticate.

A user issue affected by this: https://github.com/domainaware/parsedmarc/issues/111

alpuks commented 2 years ago

First time making adjustments to other peoples code :)

I think a hacky way to get Oauth support would be to do the following: https://github.com/alpuks/mailsuite/commit/80aa0aaf82bded698ee2e40058301591e899ec00

Basically an additional parameter which then controls whether the basic auth login is used or oauth2.