MailKit fix
parent
ccebc134a4
commit
1f7672686b
|
@ -3,6 +3,7 @@ using Correo.Abstractions.Extensions;
|
|||
using Correo.MailKit.Extensions;
|
||||
using Correo.MailKit.Models;
|
||||
using MailKit.Net.Smtp;
|
||||
using MailKit.Security;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using System;
|
||||
|
@ -26,7 +27,7 @@ namespace Correo.MailKit
|
|||
var options = _optionsAccessor.Value;
|
||||
|
||||
_smtpClient = new SmtpClient();
|
||||
_smtpClient.Connect(options.Server, options.Port, options.EnableSsl);
|
||||
_smtpClient.Connect(options.Server, options.Port, options.EnableSsl ? SecureSocketOptions.Auto : SecureSocketOptions.None);
|
||||
|
||||
if (options.UseAuthentication)
|
||||
_smtpClient.Authenticate(options.Authentication.UserName, options.Authentication.Password);
|
||||
|
|
Loading…
Reference in New Issue