|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I have a little trouble while trying to connect to gmail server.
I already enabled POP on gmail. After experience a lots of errors with the command below, now I'm seeing no more errors, but it still doesn't working, the page stay processing and just is broke after this command. $mbox = imap_open('{pop.gmail.com:995/pop3}INBOX', 'my_login@gmail.com', 'my_pass'); What should I do? Tks in advance. |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Fábio Generoso wrote:
> I have a little trouble while trying to connect to gmail server. > I already enabled POP on gmail. > After experience a lots of errors with the command below, now I'm > seeing no more errors, but it still doesn't working, the page stay > processing and just is broke after this command. > > $mbox = imap_open('{pop.gmail.com:995/pop3}INBOX', > 'my_login@gmail.com', 'my_pass'); What is $mbox at this point? A resource or false? print_r(imap_alerts()); print_r(imap_errors()); anything in those? -- Postgresql & php tutorials http://www.designmagick.com/ |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Thanks for offer your .
I will try to explain in details what I did. First of all, on file php.ini I removed the comments for the line below: extension=php_imap.dll After that, I have followed the Gmail instructions to enable POP in my Gmail account as below: 1. Log in to your Gmail account. 2. Click Settings at the top of any Gmail page. 3. Click Forwarding and POP. 4. Select Enable POP for all mail. 5. Choose "Keep Gmail's copy in the inbox" when messages are accessed with POP. When I run the simple code below: <? $mbox = imap_open('{pop3.gmail.com:995/pop3}INBOX<http://pop3.gmail.com:995/pop3%7DINBOX>', '<my_login>@ gmail.com', '<my_pass>'); print_r(imap_alerts()); print_r(imap_errors()); $num_mens_not_read = imap_num_recent($mbox); imap_close($mbox); ?> I get these errors: Warning: imap_open(): Couldn't open stream {pop3.gmail.com:995/pop3}INBOX<http://pop3.gmail.com:995/pop3%7DINBOX>in c:\arquivos de programas\easyphp1-8\www\index.php on line 2 Array ( [0] => Host not found (#11001): pop3.gmail.com ) Warning: imap_num_recent(): supplied argument is not a valid imap resource in c:\arquivos de programas\easyphp1-8\www\index.php on line 5 Warning: imap_close(): supplied argument is not a valid imap resource in c:\arquivos de programas\easyphp1-8\www\index.php on line 6 And, when I run the simple code below: <? $mbox = imap_open('{pop.gmail.com:995/pop3}INBOX<http://pop.gmail.com:995/pop3%7DINBOX>', '<my_login>@gmail.com', <my_pass>'); print_r(imap_alerts()); print_r(imap_errors()); $num_mens_not_read = imap_num_recent($mbox); imap_close($mbox); ?> I get these errors: Warning: imap_open(): Couldn't open stream { pop.gmail.com:995/pop3}INBOX<http://pop.gmail.com:995/pop3%7DINBOX>in c:\arquivos de programas\easyphp1-8\www\index.php on line 4 Fatal error: Maximum execution time of 30 seconds exceeded in c:\arquivos de programas\easyphp1-8\www\index.php on line 4 Notice: (null)(): POP3 connection broken in response (errflg=2) in Unknown on line 0 This second code looks like ok for me, but for some reason I get this time out. Do you have any idea what's going on? Did I miss some configuration? Thanks in advance. On 9/19/07, Chris < dmagick@gmail.com> wrote: > Fábio Generoso wrote: > > I have a little trouble while trying to connect to gmail server. > > I already enabled POP on gmail. > > After experience a lots of errors with the command below, now I'm > > seeing no more errors, but it still doesn't working, the page stay > > processing and just is broke after this command. > > > > $mbox = imap_open('{ pop.gmail.com:995/pop3}INBOX<http://pop.gmail.com:995/pop3%7DINBOX> ', > > 'my_login@gmail.com', 'my_pass'); > > What is $mbox at this point? A resource or false? > > print_r(imap_alerts()); > print_r(imap_errors()); > > anything in those? > > -- > Postgresql & php tutorials > http://www.designmagick.com/ > |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
> Array ( [0] => Host not found (#11001): pop3.gmail.com ) So pop3.gmail.com doesn't exist. > <? > $mbox = imap_open('{pop.gmail.com:995/pop3}INBOX<http://pop.gmail.com:995/pop3%7DINBOX>', > '<my_login>@gmail.com', <my_pass>'); > print_r(imap_alerts()); > print_r(imap_errors()); > $num_mens_not_read = imap_num_recent($mbox); > imap_close($mbox); > ?> > > I get these errors: > > Warning: imap_open(): Couldn't open stream { > pop.gmail.com:995/pop3}INBOX<http://pop.gmail.com:995/pop3%7DINBOX>in > c:\arquivos de programas\easyphp1-8\www\index.php on line 4 > Fatal error: Maximum execution time of 30 seconds exceeded in c:\arquivos de > programas\easyphp1-8\www\index.php on line 4 > Notice: (null)(): POP3 connection broken in response (errflg=2) in Unknown > on line 0 > > > This second code looks like ok for me, but for some reason I get this time > out. Do you have any idea what's going on? Did I miss some configuration? Line 4 is $num_mens_not_read = imap_num_recent($mbox); so it's taking too long to work out how many are recent. How many unread messages are there in your account? How many messages in total? -- Postgresql & php tutorials http://www.designmagick.com/ |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
*Hi Cris,*
*I have tried to use:* *$mbox = imap_open('{**pop.gmail.com:995/pop3}INBOX<http://pop.gmail.com:995/pop3%7DINBOX> **<**http://pop.gmail.com:995/pop3%7DINBOX**>',* *> '<my_login>@**gmail.com**', <my_pass>');* *As you suggest but it didn't work. * *The time out is not for the function:* *imap_num_recent($mbox);* *It is for the function:* *imap_open('{pop.gmail.com:995/pop3}INBOX', '<my_login>@**gmail.com**', <my_pass>'**);* *In order to confirm that, I have created a new account with just 5 e-mails and I have gotten the same problem.* *And... I also check that using the code without the function*: imap_num_recent($mbox); *as* *bellow:* *$mbox = imap_open('{pop.gmail.com:995/pop3}INBOX','fhgeneroso@gmail.com', 'O3S/4o1*');* *print_r(imap_alerts());* *print_r(imap_errors());* *I got the same message error:* *Warning**: imap_open(): Couldn't open stream {pop.gmail.com:995/pop3}INBOXin c:\arquivos de programas\easyphp1-8\www\index.php on line 4 Fatal error: Maximum execution time of 30 seconds exceeded in c:\arquivos de programas\easyphp1-8\www\index.php on line 4 Notice: (null)(): POP3 connection broken in response (errflg=2) in Unknownon line 0* * * *So I have tried to use the function* *set_time_limit(0);* *to suppress the time out but it still didn't work:* *set_time_limit(0);* *$mbox = imap_open('{pop.gmail.com:995/pop3}INBOX','fhgeneroso@gmail.com', 'O3S/4o1*');* *print_r(imap_alerts());* *print_r(imap_errors());* *I got these errors:* *Warning**: imap_open(): Couldn't open stream {pop.gmail.com:995/pop3}INBOXin c:\arquivos de programas\easyphp1-8\www\index.php on line 4 Array ( [0] => POP3 connection broken in response )* *Looks like I have reached the gmail server but for same configuration or network issue, I'm not able to receive the answer. * *Any suggestion?* * * *Tks.* On 9/24/07, Chris <dmagick@gmail.com> wrote: > > > > Array ( [0] => Host not found (#11001): pop3.gmail.com ) > > So pop3.gmail.com doesn't exist. > > > <? > > $mbox = imap_open('{pop.gmail.com:995/pop3}INBOX< > http://pop.gmail.com:995/pop3%7DINBOX>', > > '<my_login>@gmail.com', <my_pass>'); > > print_r(imap_alerts()); > > print_r(imap_errors()); > > $num_mens_not_read = imap_num_recent($mbox); > > imap_close($mbox); > > ?> > > > > I get these errors: > > > > Warning: imap_open(): Couldn't open stream { > > pop.gmail.com:995/pop3}INBOX<http://pop.gmail.com:995/pop3%7DINBOX>in > > c:\arquivos de programas\easyphp1-8\www\index.php on line 4 > > Fatal error: Maximum execution time of 30 seconds exceeded in > c:\arquivos de > > programas\easyphp1-8\www\index.php on line 4 > > Notice: (null)(): POP3 connection broken in response (errflg=2) in > Unknown > > on line 0 > > > > > > This second code looks like ok for me, but for some reason I get this > time > > out. Do you have any idea what's going on? Did I miss some > configuration? > > Line 4 is > > $num_mens_not_read = imap_num_recent($mbox); > > so it's taking too long to work out how many are recent. > > How many unread messages are there in your account? How many messages in > total? > > -- > Postgresql & php tutorials > http://www.designmagick.com/ > |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
This may not be relevant as I'm only glancing over this as I have to
leave for a meeting, but you have to enable POP access in Gmail before you can download to another email client like Thunderbird or Outlook, so maybe the same applies? Anyway, I'm looking to find a way of accessing my gmail as I am unable to access it at work as the Gmail site is blocked so please let me know if you find a successful way of connecting! Thanks, Tom On 27/09/2007, Fábio Generoso <generoso.etp@gmail.com> wrote: > *Hi Cris,* > > *I have tried to use:* > > *$mbox = imap_open('{**pop.gmail.com:995/pop3}INBOX<http://pop.gmail.com:995/pop3%7DINBOX> > **<**http://pop.gmail.com:995/pop3%7DINBOX**>',* > > *> '<my_login>@**gmail.com**', <my_pass>');* > > *As you suggest but it didn't work. * > > > > *The time out is not for the function:* > > *imap_num_recent($mbox);* > > *It is for the function:* > > *imap_open('{pop.gmail.com:995/pop3}INBOX', '<my_login>@**gmail.com**', > <my_pass>'**);* > > > > *In order to confirm that, I have created a new account with just 5 e-mails > and I have gotten the same problem.* > > *And... I also check that using the code without the function*: > imap_num_recent($mbox); *as* *bellow:* > > *$mbox = imap_open('{pop.gmail.com:995/pop3}INBOX','fhgeneroso@gmail.com', > 'O3S/4o1*');* > > *print_r(imap_alerts());* > > *print_r(imap_errors());* > > > > *I got the same message error:* > > *Warning**: imap_open(): Couldn't open stream > {pop.gmail.com:995/pop3}INBOXin c:\arquivos > de programas\easyphp1-8\www\index.php on line 4 > > Fatal error: Maximum execution time of 30 seconds exceeded in c:\arquivosde > programas\easyphp1-8\www\index.php on line 4 > > Notice: (null)(): POP3 connection broken in response (errflg=2) in > Unknownon line > 0* > > * * > > *So I have tried to use the function* *set_time_limit(0);* *to suppress the > time out but it still didn't work:* > > *set_time_limit(0);* > > *$mbox = imap_open('{pop.gmail.com:995/pop3}INBOX','fhgeneroso@gmail.com', > 'O3S/4o1*');* > > *print_r(imap_alerts());* > > *print_r(imap_errors());* > > > > *I got these errors:* > > *Warning**: imap_open(): Couldn't open stream > {pop.gmail.com:995/pop3}INBOXin c:\arquivos > de programas\easyphp1-8\www\index.php on line 4 > Array ( [0] => POP3 connection broken in response )* > > > > *Looks like I have reached the gmail server but for same configuration or > network issue, I'm not able to receive the answer. * > > *Any suggestion?* > > * * > > *Tks.* > > > On 9/24/07, Chris <dmagick@gmail.com> wrote: > > > > > > > Array ( [0] => Host not found (#11001): pop3.gmail.com ) > > > > So pop3.gmail.com doesn't exist. > > > > > <? > > > $mbox = imap_open('{pop.gmail.com:995/pop3}INBOX< > > http://pop.gmail.com:995/pop3%7DINBOX>', > > > '<my_login>@gmail.com', <my_pass>'); > > > print_r(imap_alerts()); > > > print_r(imap_errors()); > > > $num_mens_not_read = imap_num_recent($mbox); > > > imap_close($mbox); > > > ?> > > > > > > I get these errors: > > > > > > Warning: imap_open(): Couldn't open stream { > > > pop.gmail.com:995/pop3}INBOX<http://pop.gmail.com:995/pop3%7DINBOX>in > > > c:\arquivos de programas\easyphp1-8\www\index.php on line 4 > > > Fatal error: Maximum execution time of 30 seconds exceeded in > > c:\arquivos de > > > programas\easyphp1-8\www\index.php on line 4 > > > Notice: (null)(): POP3 connection broken in response (errflg=2) in > > Unknown > > > on line 0 > > > > > > > > > This second code looks like ok for me, but for some reason I get this > > time > > > out. Do you have any idea what's going on? Did I miss some > > configuration? > > > > Line 4 is > > > > $num_mens_not_read = imap_num_recent($mbox); > > > > so it's taking too long to work out how many are recent. > > > > How many unread messages are there in your account? How many messages in > > total? > > > > -- > > Postgresql & php tutorials > > http://www.designmagick.com/ > > > -- Tom Chubb tomchubb@gmail.com 07912 202846 |
|
![]() |
| Outils de la discussion | |
|
|