Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member anjanesh's Avatar
    Join Date
    Oct 2005
    Location
    Trivandrum, Kerala, India
    Posts
    7

    Default Reading Mail in PHP

    I cant seem to get to connect to my mail account in PHP.
    The email account was created in Cpanel X 1.0 (RC36)

    PHP Code:
    $mbox imap_open ("{localhost:110/pop3}INBOX""user@domain.com""password") or die(imap_last_error());
    imap_close ($mbox); 
    This is the output I get
    Code:
    Warning: imap_open(): Couldn't open stream {localhost:110/pop3}INBOX in /home/webhost1/public_html/folder/imap.php on line 6
    POP3 connection broken in response
    Notice: (null)(): POP3 connection broken in response (errflg=1) in Unknown on line 0
    Any idea how to get this work ?

    Thanks
    Anjanesh Lekshminarayanan

  2. #2
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Try changing this part:

    PHP Code:
    localhost:110/pop3 
    to this:

    PHP Code:
    localhost:110/pop3/notls 
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  3. #3
    Member anjanesh's Avatar
    Join Date
    Oct 2005
    Location
    Trivandrum, Kerala, India
    Posts
    7

    Default

    I tried in 3 ways - all 3 returned errors.
    Code:
    $mbox = imap_open("{localhost:110/pop3/notls}INBOX", "user+domain.com", "pass");
    Warning: imap_open(): Couldn't open stream {localhost:110/pop3/notls}INBOX in /home/webhost1/public_html/folder/imap.php on line 7
    Code:
    $mbox = imap_open("{localhost:110/pop3/notls}INBOX", "user@domain.com", "pass");
    Warning: imap_open(): Couldn't open stream {localhost:110/pop3/notls}INBOX in /home/webhost1/public_html/folder/imap.php on line 7
    Code:
    $mbox = imap_open("{localhost:110/pop3/notls}INBOX", "user", "pass");
    Warning: imap_open(): Couldn't open stream {localhost:110/pop3/notls}INBOX in /home/webhost1/public_html/folder/imap.php on line 7
    Anjanesh Lekshminarayanan

  4. #4
    Member
    Join Date
    Jan 2005
    Posts
    1,880

    Default

    Have you tried:

    Code:
    $mbox = imap_open("{yourdomain.com:110/pop3}INBOX", "user", "pass");
    or
    Code:
    $mbox = imap_open("{mail.yourdomain.com:110/pop3}INBOX", "user", "pass");
    or
    Code:
    $mbox = imap_open("{yourIP:110/pop3}INBOX", "user", "pass");

  5. #5
    Member anjanesh's Avatar
    Join Date
    Oct 2005
    Location
    Trivandrum, Kerala, India
    Posts
    7

    Default

    Thanks webignition - yours worked - but I dont understand why need to specify domain / IP when running on localhost ? How come localhost is not working ?

    Thanks
    Anjanesh Lekshminarayanan

Similar Threads & Tags
Similar threads

  1. Reading mail que manager
    By kdmitch in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 09-11-2006, 01:13 PM
  2. Reading mail que manager
    By kdmitch in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 09-09-2006, 10:20 AM
  3. weird thing about reading e-mail size.
    By prixone in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 10-26-2005, 10:13 AM
  4. problem reading large mail folder
    By tawfiq in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 10-28-2004, 04:42 AM
  5. Problem with server reading PHP scripts
    By jghassell in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 08-11-2003, 06:16 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube