我正在使用.NET 4.5 SmtpClient,正如我发现的那样,端口465上的所有东西都只是返回超时,我的问题是,有没有办法在.NET 4.5上发送带有端口465的电子邮件
SmtpClient c = new SmtpClient();
c.Host = "smtp.gmail.com";
c.Port = 465; //587;
c.EnableSsl = true;
c.DeliveryMethod = SmtpDeliveryMethod.Network;
c.UseDefaultCredentials = false;
c.Credentials = new System.Net.NetworkCredential(username, password);
c.Send(from, to, "test", "testtt");
Console.WriteLine("Its ok");
Console.ReadLine();