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