PHP Classes

Problem to connect to gmail.

Recommend this page to a friend!

      PHP MIME Email Message Parser  >  All threads  >  Problem to connect to gmail.  >  (Un) Subscribe thread alerts  
Subject:Problem to connect to gmail.
Summary:I can not connect to Gmail server using pop3 class.
Messages:2
Author:Ali Feizollah
Date:2008-06-26 15:45:00
Update:2008-06-27 06:47:51
 

  1. Problem to connect to gmail.   Reply   Report abuse  
Picture of Ali Feizollah Ali Feizollah - 2008-06-26 15:45:01
Hi everybody:

I am new to PHP. I want to read email and pars the header and get sender's address of new emails in Gmail.
I tried pop3 class of PHP. but I got an error says: " POP3 connect() - Error: POP3 _getnextstring() - Socket_Timeout_reached"

and this is my code:

<?php
require ('pop3.class.inc');

$p = new POP3;

// Connect to mail server
$do = $p->connect ('pop.gmail.com','995');
if ($do == false) {
die($p->error);
}

echo 'Connected to mail server';

$p->close();

?>

I just tested the connection.
Is this way and using pop3 class right to get an appropriate answer?
please help me. this is my graduation project.

thanks
Ali

  2. Re: Problem to connect to gmail.   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2008-06-27 06:47:51 - In reply to message 1 from Ali Feizollah
This forum is not about that POP3 class. I do not know the POP3 class you are using, so I cannot help you. Try using this other class that I support:

phpclasses.org/pop3class