MailMessage msg = new MailMessage("teunenrichard@gmail.com", "ipadcraze@hotmail.com", "Movies this month", "Hello this is a test mail");
msg.IsBodyHtml = false;
SmtpClient smtp = new SmtpClient("smtp.gmail.com", 587);
smtp.UseDefaultCredentials = false;
NetworkCredential xre = new System.Net.NetworkCredential("teunenrichard@gmail.com", "Password");
smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
smtp.Credentials = xre;
smtp.EnableSsl = true;
smtp.Send(msg);
This is the code i run in a form . load to do a test email but it will not rund and says operation timed out. ive tried everything please help
MessageBox.Show("mail sent");