Need help with imap_open

Discussion in 'PHP' started by heroic, Feb 17, 2008.

  1. #1
    i am trying to connect to the imap server using the php imap_open function

    imap_open ("{mail.tattol.com:143/}", "username", "password")


    but don't know why, this gives an error. http://tattol.com/email.php
     
    heroic, Feb 17, 2008 IP
  2. jayshah

    jayshah Peon

    Messages:
    1,126
    Likes Received:
    68
    Best Answers:
    1
    Trophy Points:
    0
    #2
    There is something wrong with your syntax:

    Notice how your script is trying to connect to port 110, not 143.

    Try this:

    
    imap_open("{mail.tattol.com:143}INBOX", "username", "password");
    
    PHP:
    Jay
     
    jayshah, Feb 17, 2008 IP
  3. heroic

    heroic Peon

    Messages:
    252
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    hey! i am still egtting the error.

    i get this error
    Warning: imap_open() [function.imap-open]: Couldn't open stream {mail.tattol.com:143}INBOX in /home/tattolco/public_html/email.php on line 2
    Code (markup):
     
    heroic, Feb 17, 2008 IP
  4. decepti0n

    decepti0n Peon

    Messages:
    519
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Add

    echo imap_last_error();
    PHP:
    underneath to see the error
     
    decepti0n, Feb 17, 2008 IP