imap_open and Gmail

Discussion in 'PHP' started by ip076, Aug 25, 2006.

  1. #1
    Just wondering if anyone has used imap_open to successfully connect to a Gmail account?

    I'm having some difficulties and getting a "Couldn't Open Stream" error when trying the following line:

    $mbox = imap_open("{pop.gmail.com:995/pop3}", "user", "pass");
    PHP:
    Just wondering if anyone else has done this? Maybe gmail has this blocked somehow....
     
    ip076, Aug 25, 2006 IP
  2. ccoonen

    ccoonen Well-Known Member

    Messages:
    1,606
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    160
    #2
    Do they allow pop 3 via port 995? I would just verify this - or maybe theirs another protocol a proxy or something? Just compare your pop3 connection settings when you setup your client vs. the imap code.
     
    ccoonen, Aug 25, 2006 IP
  3. ip076

    ip076 Peon

    Messages:
    79
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Google's Help Center says to use 995 for the port.

    I tried adding "/ssl" to the end of the connection string because I found that the connection requires SSL.
     
    ip076, Aug 26, 2006 IP
  4. dotcomguy

    dotcomguy Peon

    Messages:
    824
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #4
    dotcomguy, Aug 27, 2006 IP