I have this error Couldn't open stream {localhost/imap}

my code:

$server="{localhost/imap}";
$link = imap_open($server, $user, $pass);
$headers = imap_headers($link);

I change $server with some variants like

$server="{localhost/imap:143}";
$server="{localhost/imap},inbox";
$server="{127.0.01/imap}";

but in all cases I have the same error

I have php 3.0.16 Apache 1.3.12 Imap 4.1 with c-client (this info appears in phpinfo() test)

any ideas for resolve the problem?

thanks in advance