Enable SSL in web.config for SmtpClient

January 6, 2011

If you want to use SSL when connecting to your email server and are using the SmtpClient from .Net 4.0 you can now set EnableSSL via the web.config file, which you couldn’t do before. I’m only posting this because the docs (http://msdn.microsoft.com/en-us/library/w355a94k.aspx) for .Net 4 don’t seem to bother mentioning it, which is a bit frustrating. Now you can do this:

Discussion, links, and tweets

comments powered by Disqus

I'm a developer at Purplebricks and I sporadicaly tweet here. These posts in no way represent the views of my employeer.