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", "myname@mydomain.com", "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.
https://stackoverflow.com/questions/65804879/trying-to-connect-to-email-server-from-php-script-using-imap-open January 20, 2021 at 03:27PM
没有评论:
发表评论