Are you using GMail?
First of all, it’s not possible because Gmail (or some others) uses SSL (Secure Socket Layer) connections. Avast mail scanner doesn’t support SSL (Secure Socket Layer) connections. But take a look here: http://forum.avast.com/index.php?topic=10428.0 to see how to set up secure email with avast!.
Since SSL/TLS e-mail is encrypted and decrypted in the client, external virus scanners (including avast!) can’t read or scan it.
The solution is to pass e-mail in and out un-encrypted from your client (Outlook Express, Thunderbird, …) to a proxy program (Stunnel) that does the actual ssl or tls encryption/decryption of the pop3/smtp e-mail and communicates directly with the ISP server on the appropriate ports. Another drivers (OpenSSL) are need as a library of encryption/decryption routines.