I am trying to write a script that can check emails. I am having trouble getting the mailbox to open, or it opens and redirects me to a 'cannot find server' page. This is the code i'm using:
$mail=imap_open("{".$mail_host."}", $mail_user, $mail_pass);
if($mail) {
$headers = imap_headers($mail);
while (list ($key, $val) = each ($headers)) {
echo $val . "<br />\n";
}
}
imap_close($mail);
I have tried:
mail.host.com:110/pop3
mail.host.com:110/pop3/notls
mail.host.com:110/pop3/notls and
mail.host.com:995/pop3/ssl/novalidate-cert
Each time i run the script, i get redirected to a cannot find server page. Any help would be greatly appreciated!