Default Exchange mail only via wifi

I'm looking for a solution where every X minutes my phone tries to connect to any open wifi connection to access my exchange or POP mail.
When there is no wifi available it will not connect.

Is this possible?