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;