This problem has been affecting me since I installed roundcube, I can't get Gmail's IMAP settings to work with it.

The SMTP settings work fine:

    Server: ssl://smtp.gmail.com
    Port: 465
    User: ****
    Password: ****
    Trying to send email...
    SMTP send:  OK

But when I try to use Gmail's IMAP settings, I get the following error:

    Connecting to ssl://imap.gmail.com...
    IMAP connect:  NOT OK(Login failed for **** from 74.110.63.15. Could not connect to ssl://imap.gmail.com:993: Connection timed out)
    
I've tried multiple things, including contacting my server to see if the port was blocked (it wasn't), but nothing is working.

I can't figure out the problem and there are no posts on the forum with a solution.