From dc5ce5e96a90fe4c6acf19cf061ed2db340cb719 Mon Sep 17 00:00:00 2001 From: Tudor Stanciu Date: Thu, 19 Jan 2023 18:21:35 +0200 Subject: [PATCH] SmtpClient config: UseSsl => EnableSsl --- src/Correo.SmtpClient/Models/SmtpClientOptions.cs | 2 +- src/Correo.SmtpClient/SmtpClientMailer.cs | 2 +- src/Correo/appsettings.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Correo.SmtpClient/Models/SmtpClientOptions.cs b/src/Correo.SmtpClient/Models/SmtpClientOptions.cs index dc43aa3..50dcad7 100644 --- a/src/Correo.SmtpClient/Models/SmtpClientOptions.cs +++ b/src/Correo.SmtpClient/Models/SmtpClientOptions.cs @@ -4,7 +4,7 @@ { public string Server { get; init; } public int Port { get; init; } - public bool UseSsl { get; init; } + public bool EnableSsl { get; init; } public bool UseAuthentication { get; init; } public bool TrustServer { get; init; } public AuthenticationOptions Authentication { get; init; } diff --git a/src/Correo.SmtpClient/SmtpClientMailer.cs b/src/Correo.SmtpClient/SmtpClientMailer.cs index 3e069db..4ec4945 100644 --- a/src/Correo.SmtpClient/SmtpClientMailer.cs +++ b/src/Correo.SmtpClient/SmtpClientMailer.cs @@ -23,7 +23,7 @@ namespace Correo.SmtpClient var options = _optionsAccessor.Value; - _smtpClient = new System.Net.Mail.SmtpClient { Host = options.Server, Port = options.Port, EnableSsl = options.UseSsl }; + _smtpClient = new System.Net.Mail.SmtpClient { Host = options.Server, Port = options.Port, EnableSsl = options.EnableSsl }; if (options.UseAuthentication) { if (string.IsNullOrEmpty(options.Authentication.Domain)) diff --git a/src/Correo/appsettings.json b/src/Correo/appsettings.json index 7bdd60b..7d867b5 100644 --- a/src/Correo/appsettings.json +++ b/src/Correo/appsettings.json @@ -38,7 +38,7 @@ "Password": "********" }, "UseAuthentication": true, - "UseSsl": true, + "EnableSsl": true, "TrustServer": false } } \ No newline at end of file