email - Using PHP with IMAP to check POP3 "syntax error" -


i trying connect pop3 email account hosted website host. website shared host. email host check emails windows live mail.mysite.com port 110 , works fine.

using php , imap have not had luck. did check , host have imap installed. after fought few hours , learned when imap_open fails tries 3 more times fun. started imap_last_error() error checker telling me cannot connect mail: many login failures once figured out happening did not take long figure out how rest of errors , how turn off not retry.

now getting syntax error have tried dozens , dozens different variations of hostname. below include 4 people can see of saner things have tried , results.

as new missing obvious more experience. open other ways go this. want able use php script open , read emails on particular account. not picky or kind of interface. have been trying imap 1 have found.

//$hostname   = '{mail.mysite.com:110}inbox'; //array(1) { [0]=> string(49) "[closed] imap connection broken (server response)" } //$hostname   = '{mail.mysite.com:110/pop3}inbox'; //array(1) { [0]=> string(142) "certificate failure mail.mysite.com: server name not match certificate: /ou=domain control validated/cn=*.websitesource.net" } $hostname   = "{mail.mysite.com:110/pop3/novalidate-cert}inbox"; //array(1) { [0]=> string(12) "syntax error" } //$hostname   = '{mail.websitesource.net:110/pop3}inbox'; //array(1) { [0]=> string(12) "syntax error" }  //a temp account testing $user       = 'a@mysite.com'; $password       = '12345678!';  /* try connect */ $inbox = imap_open($hostname,$username,$password,0,0) or die( var_dump(imap_errors ()) );   //see errors @ top of code, current error 'syntax error' 

you using wrong variable. replace $username $user

$inbox = imap_open($hostname,$user,$password,0,0) or die( var_dump(imap_errors ()) ); 

Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -