Reworked IMAP setup flow. Implemented easy way to share protocol log on failure if possible.
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
}
|
||||
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user