Comunidad de diseño web y desarrollo en internet online

ayuda (imap y gmail en php)

Citar            
MensajeEscrito el 21 Dic 2009 03:58 pm
hola,necesitaria si me pueden ayudar tengo esta pagina en php http://www.6700.com.ar/ver/mail.php
y el siguiente codigo

Código PHP :

<?
/* connect to gmail */
$hostname = 'map.gmail.com:993/imap/ssl/novalidate-cert';
$username = '[email protected]';
$password = 'password';

/* try to connect */
$inbox = imap_open($hostname,$username,$password) or die('Cannot connect to Gmail: ' . imap_last_error());

/* grab emails */
$emails = imap_search($inbox,'ALL');

/* if emails are returned, cycle through each... */
if($emails) {
   
   /* begin output var */
   $output = '';
   
   /* put the newest emails on top */
   rsort($emails);
   
   /* for every email... */
   foreach($emails as $email_number) {
      
      /* get information specific to this email */
      $overview = imap_fetch_overview($inbox,$email_number,0);
      $message = imap_fetchbody($inbox,$email_number,2);
      
      /* output the email header information */
      $output.= '<div class="toggler '.($overview[0]->seen ? 'read' : 'unread').'">';
      $output.= '<span class="subject">'.$overview[0]->subject.'</span> ';
      $output.= '<span class="from">'.$overview[0]->from.'</span>';
      $output.= '<span class="date">on '.$overview[0]->date.'</span>';
      $output.= '</div>';
      
      /* output the email body */
      $output.= '<div class="body">'.$message.'</div>';
   }
   
   echo $output;
} 

/* close the connection */
imap_close($inbox);
?>


y a todo esto me devuelve el siguiente error

Error escribió:


Warning: imap_open() [function.imap-open]: Couldn't open stream map.gmail.com:993/imap/ssl/novalidate-cert in \\hmfsw\web\dtcwin071\6700.com.ar\public_html\ver\mail.php on line 8
Cannot connect to Gmail: Can't open mailbox map.gmail.com:993/imap/ssl/novalidate-cert: no such mailbox

Por hdf1986

68 de clabLevel



Genero:Masculino  

Estudiante de día y developer por las noches

firefox
Citar            
MensajeEscrito el 21 Dic 2009 08:45 pm
No es map.gmail.com, es imap.gmail.com

Por DriverOp

Claber

2510 de clabLevel



 

opera
Citar            
MensajeEscrito el 22 Dic 2009 09:25 pm
ya esta no era eso,pero tampoco lo solucione,nada mas que logre otra forma de lo que queria(enviar un sms y que se publique en la web) pero gracias driverOp

Por hdf1986

68 de clabLevel



Genero:Masculino  

Estudiante de día y developer por las noches

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.