trouble trying to connect to gmail server.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for offer your help.
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@xxxxxxxxx> 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@xxxxxxxxx', '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/
>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux