Ver Mensaje Individual
  #18 (permalink)  
Antiguo 14/08/2008, 16:56
Avatar de dcolo
dcolo
 
Fecha de Ingreso: junio-2007
Mensajes: 20
Antigüedad: 16 años, 10 meses
Puntos: 0
Respuesta: ayuda para mandar html por php

Si yo tengo

Código PHP:
   $r=mysql_query($consulta2,$conectar);
   
$t=mysql_num_rows($r);
   echo 
$t.'<br>';
 
 while (
$row_consulta mysql_fetch_assoc($r)){

    
$mail2 $row_consulta['correo'];
 
    echo 
$mail2.'<br>';    


No hay ningun problema pues me imprime los mails y el valor de $t como es

Pero si le agrego:
Código PHP:
   $r=mysql_query($consulta2,$conectar);
   
$t=mysql_num_rows($r);
   echo 
$t.'<br>';
 
 while (
$row_consulta mysql_fetch_assoc($r)){

    
$mail2 $row_consulta['correo'];
 
    echo 
$mail2.'<br>';    
        
    
$mail = new PHPMailer();
    
$mail->Host "localhost";
    
$mail->From "[email protected]";
    
$mail->FromName "yo";
    
$mail->Subject "hola";
    
$mail->AddAddress($email);
    
$mail->AddBCC("");
    
    
$body  "Hola <strong>ami</strong><br>";
    
$body .= "probando <i>PHPMailer<i>.<br><br>";
    
$body .= "<font color='red'>Saludos \n</font>";
    
$mail->Body $body;
    
$mail->AltBody "Hola ami\nprobando PHPMailer\n\nSaludos";
    
$mail->AddAttachment("htmls/algo.html""algo.html");
    
$mail->AddAttachment("htmls/al.jpg""al.jpg")

    
$mail->Send(); 

es ahi donde ya no me da nada y no se porque si alguien me puede decir