In you're Thunderbird settings make sure you have 'Connection Security' set to NONE for both server setting and outgoing server in you're thunderbird, and in you're Avast SSL accounts make sure you have choose SSL for POP / SMTP / IMAP and let me know.