Ver Mensaje Individual
  #19 (permalink)  
Antiguo 14/08/2008, 21:46
Avatar de TolerantX
TolerantX
 
Fecha de Ingreso: marzo-2006
Ubicación: Guadalajara, México.
Mensajes: 408
Antigüedad: 20 años, 6 meses
Puntos: 10
Respuesta: ayuda para mandar html por php

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($mail2); // <==== cambié el nombre de la variable
    
$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(); 
} 
__________________
TolerantX
http://tolerantx.com
Linux User #385226