The secret sauce is System.Net.Mail namespace.