Did you set avast correctly to scan Outbound emails (Internet Mail provider settings)? Are you email settings changed to 127.0.0.1 with smtp authentication?