This is what I would do:
private void SendRegistrationMail()
{
StringBuilder sb = new StringBuilder();
sb.AppendLine("Dear User,");
sb.AppendLine("");
sb.AppendLine("Thanks for register in my site.");
sb.AppendLine("");
sb.AppendLine("Thanks and Regards,");
sb.AppendLine("Dhineshkumar V");
MailMessage message = new MailMessage();
message.To.Add("[USER EMAIL]");
message.Subject = "Thank you for registering";
message.From = new MailAddress("[MY_OWN_EMAIL]");
message.Body = (sb.ToString());
message.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient("[MY_SMTP_SERVER_NAME]");
smtp.Port = 80;
smtp.EnableSsl = false;
string smtpUserName = "";
string smtpPassword = "";
if (smtpUserName != "" && smtpPassword != "")
smtp.Credentials = new NetworkCredential(smtpUserName, smtpPassword);
try
{
smtp.Send(message);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message + Environment.NewLine + Environment.NewLine + ex.StackTrace,
"Couldn't send email!", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}