C# Windows Form Application - Send email using gmail smtp
问题 I have been trying to create a small program to send email through smtp.gmail.com, but it always prompt me that "The operation has timed out". I know there are lots of solutions available on the net but none of it works. try { MailMessage message = new MailMessage(); SmtpClient smtp = new SmtpClient(); message.From = new MailAddress("from@gmail.com"); message.To.Add(new MailAddress("to@gmail.com")); message.Subject = "Test"; message.Body = "Content"; smtp.Port = 465; smtp.Host = "smtp.gmail