Mailozaurr
Mailozaurr copied to clipboard
Add UseDefaultCredentials
In SMTP mail UseDefaultCredentials can be called to skip need to provide credentials.
- https://docs.microsoft.com/en-us/dotnet/api/system.net.mail.smtpclient.usedefaultcredentials?view=netcore-3.1
In Send-MailMessage it seems to be turned on by default if there's no login/pass prompt given or at least I think so. Would need to check sources.
- https://github.com/EvotecIT/PSWriteHTML/issues/156
In MailKit it can be achieved it seems but requires some deep dive
- https://stackoverflow.com/questions/38113437/is-it-possible-to-use-default-network-credentials-with-mailkit-and-exchange
- https://github.com/jstedfast/MailKit/issues/332#issuecomment-398300208
Is there any plan on implementing this? It would be very beneficial for situations where we need services to send emails using a local AD integrated SMTP server and don't want to store credentials.
It is wanted & therefore planned, but I lack time to implement this. But if you have time, feel free to take a bite.
@PrzemyslawKlys I looked through the thread from MailKit and it seems that integrated authentication isn't implemented yet even on MailKit due to not being cross compatible.
@AvrumFeldman it probably never will be cross-compatible, but from what I see https://github.com/jstedfast/MailKit/issues/332#issuecomment-398300208 someone did do it on Windows, which would be enough.
@PrzemyslawKlys I didn't realize you are fine with non cross compatibility. I will try to give it a shot over the next week (hopefully).
@AvrumFeldman any luck?
@PrzemyslawKlys what a coincident you are asking now. I've just worked this night a few hours on it and I'm (hopefully) almost done.
Great - we're only missing this and signing functionality. Looking forward to this!
Implemented in:
- https://github.com/EvotecIT/Mailozaurr/pull/47
Hopefully will work