From 43bcc87ad0b8ccd8764a6c3e18d776b10271e1f9 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Wed, 23 Oct 2024 22:19:01 +0100 Subject: [PATCH] fix: pass cert validation check --- OliverBooth/Controllers/ContactController.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/OliverBooth/Controllers/ContactController.cs b/OliverBooth/Controllers/ContactController.cs index bf38e52..4533ad9 100644 --- a/OliverBooth/Controllers/ContactController.cs +++ b/OliverBooth/Controllers/ContactController.cs @@ -95,6 +95,7 @@ public class ContactController : Controller destination = mailSection.GetSection("Destination").Value ?? string.Empty; var client = new SmtpClient(); + client.ServerCertificateValidationCallback = (s, c, h, e) => true; client.Connect(mailServer, port, SecureSocketOptions.SslOnConnect); client.Authenticate(mailUsername, mailPassword); return client;