Welcome to the forum.
For completeness please advise your operating system on the PC and the version of avast.
Rather than completely uninstalling avast can you try to isolate one of the avast providers that, when stopped, allows the connection to be made? For example, the Internet Mail provider. the Webshield or the Network Shield come to mind.