Could be IPv6, or rather the way Android handles it (filed in the official Android bug tracker, not much happened then).
Recent development versions of Aqua have a workaround. They're available here on the forum. Please try updating.
If this doesn't help, please capture the issue in a debug log (see below).
Also worth noting:
-- if this is a public / office WiFi network, it could very well allow only HTTP (web browsing) traffic, as a security policy (go figure).
-- the Android Gmail app is not a good comparison, since it does not use IMAP / SMTP, so its network traffic is different and may be allowed by the WiFi network.