The SMTP
class in System.Net.Mail
lets you send email using the Simple Mail Transfer Protocol (SMTP). By default, it does not use Secure Sockets Layer (SSL) to encrypt the connection. It is therefore recommended that you enable SSL to secure your application and its data transmission.
var smtp = new SmtpClient(host, port);
var smtp = new SmtpClient(host, port)
{
EnableSsl = true
};