I made a little changes in your code and its working fine
MailMessage message = new MailMessage();
message.To.Add("ashish_tyagi_20@yahoo.co.in");
message.From = new MailAddress("username@gmail.com");
message.Subject = "New test mail";
message.Body = "Hello test message succeed";
message.IsBodyHtml = true;
message.BodyEncoding = System.Text.Encoding.ASCII;
SmtpClient smtp = new SmtpClient();
smtp.EnableSsl = true;
smtp.Port = 587;
smtp.UseDefaultCredentials = false;
tp.DeliveryMethod = SmtpDeliveryMethod.Network;
smtp.Host = "smtp.gmail.com";
smtp.Credentials = new System.Net.NetworkCredential("username", "password");
try
{
smtp.Send(message);
}
catch (Exception ex)
{
throw ex;
}