SmtpClient config: UseSsl => EnableSsl
parent
c3b0fb60df
commit
dc5ce5e96a
|
@ -4,7 +4,7 @@
|
||||||
{
|
{
|
||||||
public string Server { get; init; }
|
public string Server { get; init; }
|
||||||
public int Port { get; init; }
|
public int Port { get; init; }
|
||||||
public bool UseSsl { get; init; }
|
public bool EnableSsl { get; init; }
|
||||||
public bool UseAuthentication { get; init; }
|
public bool UseAuthentication { get; init; }
|
||||||
public bool TrustServer { get; init; }
|
public bool TrustServer { get; init; }
|
||||||
public AuthenticationOptions Authentication { get; init; }
|
public AuthenticationOptions Authentication { get; init; }
|
||||||
|
|
|
@ -23,7 +23,7 @@ namespace Correo.SmtpClient
|
||||||
|
|
||||||
var options = _optionsAccessor.Value;
|
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 (options.UseAuthentication)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(options.Authentication.Domain))
|
if (string.IsNullOrEmpty(options.Authentication.Domain))
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
"Password": "********"
|
"Password": "********"
|
||||||
},
|
},
|
||||||
"UseAuthentication": true,
|
"UseAuthentication": true,
|
||||||
"UseSsl": true,
|
"EnableSsl": true,
|
||||||
"TrustServer": false
|
"TrustServer": false
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue