Refer to these links:
System.Net.Mail FAQ[
^]
Sending Mail Using Net.Mail With Authentication[
^]
how to send mail from local[
^]
Try
SmtpServer.EnableSsl = true;
Try the below code which uses gmail.
MailMessage mail = new MailMessage();
mail.From = new MailAddress("gmail_Id@gmail.com");
mail.To.Add(new MailAddress(to_address));
mail.Subject = "your subject";
mail.IsBodyHtml = true;
mail.Body = Body here;
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.gmail.com";
smtp.Credentials = new System.Net.NetworkCredential("gmail_Id@gmail.com", "12345");
smtp.EnableSsl = true;
smtp.Send(mail);