fix: pass cert validation check
This commit is contained in:
parent
0b1037819a
commit
43bcc87ad0
@ -95,6 +95,7 @@ public class ContactController : Controller
|
|||||||
destination = mailSection.GetSection("Destination").Value ?? string.Empty;
|
destination = mailSection.GetSection("Destination").Value ?? string.Empty;
|
||||||
|
|
||||||
var client = new SmtpClient();
|
var client = new SmtpClient();
|
||||||
|
client.ServerCertificateValidationCallback = (s, c, h, e) => true;
|
||||||
client.Connect(mailServer, port, SecureSocketOptions.SslOnConnect);
|
client.Connect(mailServer, port, SecureSocketOptions.SslOnConnect);
|
||||||
client.Authenticate(mailUsername, mailPassword);
|
client.Authenticate(mailUsername, mailPassword);
|
||||||
return client;
|
return client;
|
||||||
|
Loading…
Reference in New Issue
Block a user