In C# i got this error System.Net.Mail.SmtpException: 'Server does not support secure connections'. When trying to send email in C# using SMTP.
My mail sending code is simply this:
MailMessage message = new MailMessage();
SmtpClient smtp = new SmtpClient();
message.From = new MaillAddress("info@Domain");
message.To.Add("test@Domain");
message.IsBodyHtml = true;
message.Body = "<p>lorem</p>";
smtp.Port = 25;
smtp.Host = "smtp.outlook";
smtp.EnableSsl = True;
smtp.UseDefaultCredentials = false;
smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
smtp.Send(message);