Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/05/2011, 05:10
Menchuchu
 
Fecha de Ingreso: marzo-2009
Mensajes: 7
Antigüedad: 15 años, 1 mes
Puntos: 0
Problema phpmailer y envio de email

No me envia el email y me sale Notice: Undefined property: phpmailer::$ErrorInfo.
Se supone que lo hago todo bien pongo mi codigo
Código PHP:

require("phpmailer.inc.php");

$destinatario=$_POST["destinatario"];
$asunto=$_POST["asunto"];
$url=$_POST["url"];

$asunto .=' <p>Haz clic en el siguiente enlace para acceder:<br> <a href="'.$url.'">'.$url.'</a></p>';

$mail = new phpmailer;
$mail->IsSMTP();
$mail->SMTPAuth true;
$mail->SMTPSecure "ssl";
$mail->Host "smtp.gmail.com";
$mail->Port 465;
$mail->Username "[email protected]";
$mail->Password "xxxx";
$mail->From "[email protected]";
$mail->FromName "Carmen";
$mail->Subject "Invitacion a aula";
$mail->Body $asunto;
$mail->AddAddress($destinatario"destinatario");
$mail->IsHTML(true);  

 
if(!
$mail->Send()) {
    echo 
"Error: " .$mail->ErrorInfo;
} else {
  echo 
"Mensaje enviado correctamente";