System.Net.Mail.MailMessage msg = new System.Net.Mail.MailMessage();
msg.To.Add(TextBox1.Text);
msg.Subject = "Forgot password.";
msg.From = new System.Net.Mail.MailAddress("autoemail@xyz.com");
msg.Body += "Have a great day!\n";
msg.Body += " \n ";
msg.Body += "-Team\n XYZ services!";
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("localhost");
smtp.Send(msg);
Try this!!