Ver Mensaje Individual
  #3 (permalink)  
Antiguo 05/08/2015, 09:39
eehr
 
Fecha de Ingreso: julio-2015
Mensajes: 3
Antigüedad: 8 años, 9 meses
Puntos: 0
Respuesta: problemas con php mailer

Yo utilizo este código y me funciona muy bien..

require('Mail/class.phpmailer.php');
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPAuth = true;
// $mail->SMTPSecure = "ssl";
$mail->Host = $Servidor;
$mail->Port = $Puerto;
$mail->Username = $Usuario;
$mail->Password = $Contrasena;
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>
//====== DE QUIEN ES ========
$mail->From = $Usuario;
$mail->FromName = $Nombre;
//====== PARA QUIEN =========
$mail->Subject = "E-mail ";
$body .=" Notificacion ";
$mail->Body = $body;
$mail->AltBody = ".";
$mail->AddAddress("$Correo","Correo");
}
}
if($mail->Send()) {
} else {
echo "Error al enviar mensaje: " . $mail->ErrorInfo;
}