imap_open fails no matter what i try

aandreas

New member
Joined
Mar 25, 2009
Messages
1
imap_open fails no matter what i try

// open mailbox and get all emails from server
if (! $mail = imap_open("{localhost:110/pop3/notls} INBOX", "user", "password")) {

echo "fout";
}

gives :

Warning: imap_open() [function.imap-open]: Couldn't open stream {localhost:110/pop3/notls} INBOX in /usr/home/user/domains/nictoglobe.com/public_html/mymms.class.php


i tried several possible combinations i.e.:

mail.domain.com, the name of the server running da, with and without notls etc etc

when telnetting to port 110 everything is ok

how come?

used to work with plesk , is broken with da

help?

A.Andreas
 
I'm not sure it matters, but every example in php.net/imap_open don't have a space between '}' and 'INBOX'.
Futhermore, use:
Code:
... or die("IMAP Stream error: " . imap_last_error());
instead of the whole if (! ...){} thing.
 
Back
Top