mirror of
https://dev.azure.com/tstanciu94/Services/_git/Correo
synced 2025-03-29 15:21:26 +02:00
MailKit fix
This commit is contained in:
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…
x
Reference in New Issue
Block a user