IMAP Open Error Heartache

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
costas
Forum Newbie
Posts: 4
Joined: Tue Dec 09, 2003 10:15 pm

IMAP Open Error Heartache

Post by costas »

When I execute the following to open a POP server I get an error.

$IP=gethostbyname("pop.mailserver.com");
$MAILSERVER="{" . "$IP:110/pop3" . "}INBOX";
$user="john@mydomain.com";
$pass="secret";
$mbox = @imap_open($MAILSERVER,$user,$pass);

---- Error message
Debug session started.
Debug Warning: /root/parsembox.php line 6 - Couldn't open stream {nnn.nnn.nnn.nnn:110/pop3}INBOX
----------------------------------

I am using RH9 and PHP 4.3. I tried different options like /nolst.

This server works using "telnet pop.mailserver.com 110" and entering user and pass.

Any ideas?

Thanks
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

try

Code: Select all

$MAILSERVER="{" . "$IP:110/pop3/notls" . "}INBOX";
costas
Forum Newbie
Posts: 4
Joined: Tue Dec 09, 2003 10:15 pm

Post by costas »

Weirdan wrote:try

Code: Select all

$MAILSERVER="{" . "$IP:110/pop3/notls" . "}INBOX";
I cut and pasted your line. No luck, same error message. If I do this using sockets() it works. Any settings I should be checking?

Thanks.
Post Reply