Ver Mensaje Individual
  #1 (permalink)  
Antiguo 15/01/2009, 08:55
letni
 
Fecha de Ingreso: octubre-2008
Mensajes: 276
Antigüedad: 15 años, 6 meses
Puntos: 1
No aparecen los saltos de línea al enviar con phpmailer

Hola, tengo este código para enviar correos electrónicos:

Código PHP:
function EnviarEmail($Para$Asunto$Cuerpo) {
    include(
"config.php"); 
    
$mail = new PHPMailer ();

    
$mail -> From $mailuser;
    
$mail -> FromName $mailfrom;
    
$mail -> AddAddress ($Para);
    
$mail -> Subject $Asunto;
    
$mail -> Body $Cuerpo;
    
$mail -> IsHTML (true);

    
$mail->IsSMTP();
    
$mail->Host 'ssl://smtp.gmail.com';
    
$mail->Port 465;
    
$mail->SMTPAuth true;
    
$mail->Username $mailuser;
    
$mail->Password $mailpass;

    if(!
$mail->Send())
        echo 
'Error: ' $mail->ErrorInfo;
    else 
        echo 
'</br>Se ha enviado un correo electrónico a su dirección de correo'

y luego la llamo así:

Código PHP:
$Cuerpo "Línea1.</br></br>Linea2.</br>Linea3.";
echo 
$Cuerpo;
EnviarEmail($Para$Asunto$Cuerpo
En el navegador web me sale:

Código:
Línea1.

Linea2.
Linea3.
y al correo me llega:

Código:
Línea1. Linea2. Linea3.
¿Qué es lo que falla?

Saludos.