I tried every combination mentioned in the many instructions available on line. 995/587, 993/25, 143/465, 585/2525. I've also tried auto, SSL and TLS. (Different sites offer different port combinations.) I've also tried mixing those port combinations, but to no avail.
My Win 7 set up was POP, which worked fine. I forget why I decided on that rather than IMAP (which virtually all sites online suggest is better than POP). I do recall that IMAP did present a problem that POP did not. On the new system, I've tried both POP and IMAP.