Closed l-o-l closed 9 years ago
Most real-world servers support an initial-response argument when using the SASL LOGIN mechanism, but it appears that FakeSMTP does not which is why you got an exception.
The LOGIN mechanism never made it into an accepted standard (it was abandoned as a draft and expired in 2004) and so FakeSMTP really should update their code to support the PLAIN mechanism which is the replacement for LOGIN.
Thanks for answering this so quickly. The code I am looking to replace is in a product that has a large install base using all and sundry commercial email servers. Is this FakeSTMP thing simply bugged, or is it likely to pop up in another server somewhere?
It's not likely to pop up in a real-world server for 2 reasons:
AUTH
command.I plan on making a new release of MimeKit and MailKit this weekend anyway, so you won't have to wait very long for the next release.
Hope that helps.
Using the example SMTP send email code and this "dummy" smtp server:
https://nilhcem.github.io/FakeSMTP/
I get an AuthenticationException (Authentication Failed).
Protocol Log:
Connected to smtp://127.0.0.1:25/?starttls=when-available S: 220 XXXXXX ESMTP SubEthaSMTP null C: EHLO [127.0.0.1] S: 250-XXXXXX S: 250-8BITMIME S: 250-AUTH LOGIN S: 250 Ok C: AUTH LOGIN QmVuLkdyYWhhbUBvdXRsb29rLmNvbQ== S: 334 VXNlcm5hbWU6 C: S: 334 UGFzc3dvcmQ6 C: AUTH LOGIN QmVuLkdyYWhhbUBvdXRsb29rLmNvbQ== S: 235 Authentication successful.
Mailkit Version: 1.2.7.0
Code works fine against GMAIL and legacy code (which I am looking to replace) works fine against this server.