From 62fc21be7e065432eb3c6b9ec442267728d9c3b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Kaan=20K=C3=B6se?= Date: Wed, 29 Jan 2025 18:55:54 +0100 Subject: [PATCH] Yahoo custom settings. --- .../SpecialImapProviderConfigResolver.cs | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Wino.Services/SpecialImapProviderConfigResolver.cs b/Wino.Services/SpecialImapProviderConfigResolver.cs index b2da4e99..e3de0587 100644 --- a/Wino.Services/SpecialImapProviderConfigResolver.cs +++ b/Wino.Services/SpecialImapProviderConfigResolver.cs @@ -21,6 +21,20 @@ namespace Wino.Services MaxConcurrentClients = 5, }; + private readonly CustomServerInformation yahooServerConfig = new CustomServerInformation() + { + IncomingServer = "imap.mail.yahoo.com", + IncomingServerPort = "993", + IncomingServerType = CustomIncomingServerType.IMAP4, + IncomingServerSocketOption = ImapConnectionSecurity.Auto, + IncomingAuthenticationMethod = ImapAuthenticationMethod.Auto, + OutgoingServer = "smtp.mail.yahoo.com", + OutgoingServerPort = "587", + OutgoingServerSocketOption = ImapConnectionSecurity.Auto, + OutgoingAuthenticationMethod = ImapAuthenticationMethod.Auto, + MaxConcurrentClients = 5, + }; + public CustomServerInformation GetServerInformation(MailAccount account, AccountCreationDialogResult dialogResult) { @@ -34,6 +48,14 @@ namespace Wino.Services resolvedConfig.IncomingServerUsername = dialogResult.SpecialImapProviderDetails.Address.Split('@')[0]; resolvedConfig.OutgoingServerUsername = dialogResult.SpecialImapProviderDetails.Address; } + else if (dialogResult.SpecialImapProviderDetails.SpecialImapProvider == SpecialImapProvider.Yahoo) + { + resolvedConfig = yahooServerConfig; + + // Yahoo uses full address for both incoming and outgoing. + resolvedConfig.IncomingServerUsername = dialogResult.SpecialImapProviderDetails.Address; + resolvedConfig.OutgoingServerUsername = dialogResult.SpecialImapProviderDetails.Address; + } // Fill in account details. resolvedConfig.Address = dialogResult.SpecialImapProviderDetails.Address;