The solutions above didn't work for me, but I figured it out.
If you go to your Avast settings, then choose Active Protection, then click Customize next to the Mail Shield, then click the SSL Settings.
At the bottom of that screen it should show a list of your accounts that Avast has scanned in the past, but at the bottom it says that Avast no longer uses these settings so they should be deleted!
I guess the reason that Avast didn't just delete those settings is because there was also a note saying you should now configure your email program to use SSL (or TLS etc), unlike in the past when you were supposed to let Avast handle that.
As soon as I deleted the accounts from the Avast settings then, my email started working again. Except for my Gmail via POP, but that sporadically has problems so I don't know if that's related... Anyway all my other POP accounts started working immediately after deleting them from Avast's SSL Settings.