[issue15014] smtplib: add support for arbitrary auth methods

Milan Oberkirch report at bugs.python.org
Tue Mar 4 14:51:38 CET 2014


Milan Oberkirch added the comment:

I looked into imaplib a bit to see how the problem is solved there; what I observed:
- login() does 'PLAIN' only (and does not use authobj but smtplib would)
- there exists an extra function login_cram_md5() for 'CRAM-MD5'

So I guess the right way to do it would be to write an authenticate() method as in imaplib and use it in new member functions of the form login_[method](). In contrast to imaplib login() could still be used to probe through the three main methods (to avoid breaking backward compatibility).

I'll try to implement this later today, so if you think it's completely dumb and read this before a patch is applied feel free to give me a quick reply to stop me from wasting my time :)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15014>
_______________________________________


More information about the Python-bugs-list mailing list