I'm not a programmer, so please bear with me. Sorry if this is dumb.
I can create and use php scripts on my website no problem. For the last few days, I've been trying to figure out a way to check my email programmatically. The most common solution seemed to involve connecting using imap_open. Here is an example of just that one line of code:
$mail = imap_open("{mymailserver:110}INBOX", "[email protected]", "mypassword");
And obviously my mail server, username, and password go between the quotes. Just in that one opening line, the page hangs and eventually gives a 504 Gateway Time-out error.
Thunderbird can connect to my email using the same mail server, port, name and password. If i plug in info from a gmail account, it still hangs and times out. When i run phpinfo it says something about imap enabled (sorry if that's not relevant, i'm not sure).
Network Solutions, who hosts my site, told me that I shouldn't be using scripts to connect to email, but they would look into it if I paid a fee. Any help would be greatly appreciated, as I've been trying this for 20 hrs. Thanks.
Port 110 is for POP3. I suggest you try to connect thru port 143 (IMAP)
Please try using the following codes to test (substitute imap.example.com by your mail server say mail.test.com) :
Note: for the username, in your case it may be your email address ([email protected])