Reworked IMAP setup flow. Implemented easy way to share protocol log on failure if possible.

This commit is contained in:
Burak Kaan Köse
2024-06-17 02:16:06 +02:00
parent a788b1706b
commit 49afed7751
24 changed files with 1000 additions and 331 deletions

View File

@@ -1,21 +0,0 @@
using System;
namespace Wino.Core.Domain.Models.AutoDiscovery
{
public class AutoDiscoveryConnectionTestFailedPackage
{
public AutoDiscoveryConnectionTestFailedPackage(AutoDiscoverySettings settings, Exception error)
{
Settings = settings ?? throw new ArgumentNullException(nameof(settings));
Error = error ?? throw new ArgumentNullException(nameof(error));
}
public AutoDiscoveryConnectionTestFailedPackage(Exception error)
{
Error = error ?? throw new ArgumentNullException(nameof(error));
}
public AutoDiscoverySettings Settings { get; set; }
public Exception Error { get; set; }
}
}

View File

@@ -30,9 +30,6 @@ namespace Wino.Core.Domain.Models.AutoDiscovery
if (imapSettings == null || smtpSettings == null) return null;
bool imapRequiresSSL = imapSettings.Secure == "SSL";
bool smtpRequiresSSL = smtpSettings.Secure == "SSL";
string imapUrl = imapSettings.Address;
string smtpUrl = smtpSettings.Address;
@@ -49,8 +46,8 @@ namespace Wino.Core.Domain.Models.AutoDiscovery
Address = UserMinimalSettings.Email,
IncomingServerPassword = UserMinimalSettings.Password,
OutgoingServerPassword = UserMinimalSettings.Password,
IncomingRequiresSSL = imapRequiresSSL,
OutgoingRequresSSL = smtpRequiresSSL,
IncomingAuthenticationMethod = Enums.ImapAuthenticationMethod.Auto,
OutgoingAuthenticationMethod = Enums.ImapAuthenticationMethod.Auto,
IncomingServer = imapUrl,
OutgoingServer = smtpUrl,
IncomingServerPort = imapPort.ToString(),