Closed srosam closed 3 years ago
This,
.Endpoint(builder => builder .Port(port, false) .AllowUnsecureAuthentication() .AuthenticationRequired() )
Resolved it
Hi,
Glad that you have resolved it.
The reason it didn't work in your first example was because of setting
AllowUnsecureAuthentication(false)
If you have this set to false (which is the default) and don't supply a Certificate then it wont advertise the AUTH PLAIN LOGIN command to the client and therefore the client correctly determines that the server doesn't support authentication.
Thanks, Cain.
Hi. I'm attempting to test some code that used authentication to send mail.
It connects and sends the mail to a real external smtp server but I cannot figure out how to get this working in my test code.
I have built up this options object:
The 'SampleUserAuthenticator' just returns true but is never called.
However my client gets back an error when attempting to authenticate: "The SMTP server does not support authentication."