PHP Imap

Associate
Joined
30 Dec 2005
Posts
415
Ok so just been introduced to the PHP Imap functions and am looking forward to using it, but am not sure what the address should be.
The server i'm using is running cpanel, and when you wish to set up an email account for it, it should point to mail.yourdomain.com.

PHP:
//Ping POP3
if(imap_open ("{mail.localhost:110/imap}Inbox", "username", "password"))
{
   echo 'Connection success!';
}
else
{
   echo 'Connection failed';

Could someone explain the exact address I need to call upon instead of mail.localhost:110/imap as that returns this:

Warning: imap_open(): Couldn't open stream {mail.localhost:110/imap}Inbox in /home/etc..etc..
 
Cheers for the fast response.

Still the same problem though...
"{localhost:143}Inbox"
gives
Warning: imap_open(): Couldn't open stream {localhost:143}Inbox in /home/etc...

Am I still doing it wrong or is it time to call the hosting company to check imap is set up? It looks like it is else it wouldn't try to open the stream would it?
 
If I do the telnet I get the following:
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THRE
AD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION STARTTLS] Courier-IMAP ready. Copyr
ight 1998-2005 Double Precision, Inc. See COPYING for distribution information.

Rob, I originally thought it would need the mail. at the front, but i've never used IMAP before so I have no idea how it works etc atm... guess i've just gotta learn :p
 
Back
Top Bottom