Trying to get imap_open to work ...
Posted: Wed Mar 10, 2010 12:24 pm
I am trying to connect to our POP3 server from my code. I get an error using the following code:
ERROR: No such host as mail.mydomain.com
I can telnet into the server:
I can connect with fsockopen:
it returns:
What am I overlooking:
Regards,
Scott.
Code: Select all
$mbox = imap_open ("{mail.mydomain.com:110/pop3}INBOX", $user, $pass);
or
$mbox = imap_open ("{mail.mydomain.com/pop3:110}INBOX", $user, $pass);
$mbox = imap_open ("{mail.mydomain.com/pop3:110/notls}INBOX", $user, $pass);
print_r(imap_errors());
I can telnet into the server:
Code: Select all
telnet mail.mydomain.com 110
USER user
PASS pass
LIST
Code: Select all
$sd = fsockopen($host, 110, $errno, $errstr, 2.0);
Code: Select all
sd: Resource id #45
errno: 0
errstr:
Regards,
Scott.