Hello,
I am currently implementing a smtp handler from requests coming from a C# System.Net.Mail.SMTPClient instance with credentials (code).
I didn't understand the problem until I discovered with tcpdump that the login method is spelled "login" in lowercase:

and indeed your code is not doing any case matching on the said authentication method:

Would it be possible to transform method to uppercase before handling it?
mechanism = mechanism.upper()
 
Thanks in advance.