anjanesh

Member
Oct 4, 2005
7
0
151
Trivandrum, Kerala, India
I cant seem to get to connect to my mail account in PHP.
The email account was created in Cpanel X 1.0 (RC36)

PHP:
$mbox = imap_open ("{localhost:110/pop3}INBOX", "[email protected]", "password") or die(imap_last_error());
imap_close ($mbox);
This is the output I get
Code:
Warning: imap_open(): Couldn't open stream {localhost:110/pop3}INBOX in /home/webhost1/public_html/folder/imap.php on line 6
POP3 connection broken in response
Notice: (null)(): POP3 connection broken in response (errflg=1) in Unknown on line 0
Any idea how to get this work ?

Thanks
 

anjanesh

Member
Oct 4, 2005
7
0
151
Trivandrum, Kerala, India
I tried in 3 ways - all 3 returned errors.
Code:
$mbox = imap_open("{localhost:110/pop3/notls}INBOX", "user+domain.com", "pass");
Warning: imap_open(): Couldn't open stream {localhost:110/pop3/notls}INBOX in /home/webhost1/public_html/folder/imap.php on line 7
Code:
$mbox = imap_open("{localhost:110/pop3/notls}INBOX", "[email protected]", "pass");
Warning: imap_open(): Couldn't open stream {localhost:110/pop3/notls}INBOX in /home/webhost1/public_html/folder/imap.php on line 7
Code:
$mbox = imap_open("{localhost:110/pop3/notls}INBOX", "user", "pass");
Warning: imap_open(): Couldn't open stream {localhost:110/pop3/notls}INBOX in /home/webhost1/public_html/folder/imap.php on line 7
 

anjanesh

Member
Oct 4, 2005
7
0
151
Trivandrum, Kerala, India
Thanks webignition - yours worked - but I dont understand why need to specify domain / IP when running on localhost ? How come localhost is not working ?

Thanks