Connection string for imap_open
I'm using WAMP and I've set up a mail server using hMailServer with the help of this article and it works fine.
But when I try to connect to the mailbox through my PHP script, it throws the following error shown in the screenshot even though I have emails in my Outlook account's inbox.

This is the PHP code I've written so far.
$serverName = "{localhost/imap:143}INBOX";
$serverName = "{localhost/pop3:110}INBOX";
$userName = "isuru@localhost.localdomain";
$passWord = "paswrd";
$mbox = imap_open($serverName, $userName, $passWord);
if(!$mbox)
{
echo "Could not open Mailbox";
}
if($hdr = imap_check($mbox))
{
echo "Messages " . $hdr->Nmsgs . "\n\n<br><br>";
$msgCount = $hdr->Nmsgs;
}
else
{
echo "failed";
}
This is the information regarding the mail account.

Can anyone please tell me what I'm missing here and what changes should be done?
Thank you.






Cartoon Clouds
Mountains
Sunrise
Clouds
Green Clouds
None














Help