i want to send an e-mail to my gmail account consisting of the value in a textbox. the code below is what i'm trying to do but it's not working could you please tell me what could be my problem ? when i run the program becomes not responding than it tells me failure to send mail
MailMessage msg = new MailMessage();
msg.From = new MailAddress("myusername@gmail.com");
msg.To.Add("myusername@gmail.com");
msg.Subject = "test";
msg.Body = txtName.Text;
SmtpClient smtpClient = new SmtpClient();
smtpClient.Host = "www.gmail.com";
smtpClient.Send(msg);