user4953001 user4953001 - 19 days ago 5
C# Question

.NET Framework 4.5 : SMTP Client authentication modes?

Has someone found an official reference of which SMTP authentication modes are actually supported by the

System.Net.Mail.SmtpClient
class please?

Official MSDN seems silent on that one ; if not, where can I find a suitable SMTP client library (free or not)?

Answer

If you take a look at the source code, it looks like only LOGIN is supported unless FEATURE_PAL is defined (not sure what that is), in which case NTLM, GSSAPI, and WDIGEST are also supported.

You can take a look at Microsoft's referencesource here: https://github.com/Microsoft/referencesource/blob/d925d870f3cb3f6acdb14e71522ece7054e2233b/System/net/System/Net/mail/SmtpTransport.cs

Comments