fixed wrong ssl mode
This commit is contained in:
parent
ac4bb12880
commit
c1b05b28a5
|
@ -45,7 +45,7 @@ public class SmtpEmailSender(IOptions<SmtpConfiguration> config, ILogger<SmtpEma
|
|||
|
||||
using var client = new SmtpClient();
|
||||
await client.ConnectAsync(Configuration.Host, Configuration.Port,
|
||||
Configuration.Ssl ? SecureSocketOptions.StartTls : SecureSocketOptions.None);
|
||||
Configuration.Ssl ? SecureSocketOptions.SslOnConnect : SecureSocketOptions.None);
|
||||
if (!string.IsNullOrWhiteSpace(Configuration.Username)) {
|
||||
await client.AuthenticateAsync(Configuration.Username, Configuration.Password);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue