[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

imap php

Posted on 2012-03-09
4
Medium Priority
?
428 Views
Last Modified: 2012-06-21
Am trying to connect to my fedora 14 64bit imap server using php the code is below.

However, I am getting the following error and don't know where to start to solve it
"Can't open mailbox localhost:143INBOX: no such mailbox "
Any Ideas?

<?php
$host = 'localhost:143';
$user = 'user';
$password = 'password';
$mailbox = "{$host}INBOX";

$mbox = imap_open($mailbox , $user , $password);
$str = imap_errors();  echo("imap_errors():\n");  print_r($str);

if (imap_ping($mbox)){ print "success";}
else                 { print "fail"; }

imap_close($mbox);

?>

Open in new window

0
Comment
Question by:PhillO
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 15

Expert Comment

by:StingRaY
ID: 37704223
Try wrapping your host with "{}".

$host = '{localhost:143}';
0
 

Author Comment

by:PhillO
ID: 37704289
StingRaY

Thanks for responding but if you look on Line 5 it is
0
 
LVL 15

Accepted Solution

by:
StingRaY earned 2000 total points
ID: 37704434
No. It's different. If you echo line 5, it will be "localhost:143INBOX" not "{localhost:143}INBOX".
0
 

Author Comment

by:PhillO
ID: 37704445
StingRaY

Your dead right!!! thanks
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Check out the latest tech news, community articles, and expert highlights in August's newsletter.
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question