I have came across this recently when i changed my ISP when travelled and was getting the same message,
Investigation did not bring much apart from the fact that it was related to avast. But further investigation actually showed that avast is ok but the ISP is blocking port 25, Avast just throws this message to say that it cannot connect to smtp server on that port.
to fix it i have fixed this by using alternative SMTP port (8889 for my mail provider ) and all works straight away.