Ver Mensaje Individual
  #1 (permalink)  
Antiguo 15/07/2010, 09:24
otacon3784
 
Fecha de Ingreso: diciembre-2009
Ubicación: La Paz - Bolivia
Mensajes: 67
Antigüedad: 14 años, 4 meses
Puntos: 1
imagenes en mail con class.smtp.inc

Necesito sugerencias de como enviar imagenes dentro el cueropo de un email que se manda masivamente a usuarios.
Para ello utilizo class.smtp.inc para la configuración y no ubico como mandar imágenes o el formato de las letras dentro del cuerpo del mail, los usuarios receptores trabajan con correos outlook y lotus...

Espero que me puedan dar sugerencias adjunto el php que manda los mails

Código PHP:
<?php   
  
include('class.smtp.inc'); 
  
$link=Conectarse();
  
$result=mysql_query("select paterno,materno,nombres,email from email_temp",$link);
  while(
$row mysql_fetch_array($result)) 
  {
     
//Insert del registro
     
$pat=$row["paterno"];$mat=$row["materno"];$nom=$row["nombres"];$mail=$row["email"];    
  
$params['host'] = 'XXX.X.XX.XX';                // The smtp server host/ip 
  
$params['port'] = 25;                        // The smtp server port 
  
$params['helo'] = exec('hostname');            // What to use when sending the helo command. Typically, your domain/hostname 
  
$params['auth'] = FALSE;                        // Whether to use basic authentication or not 
  
$params['user'] = '';                // Username for authentication 
  
$params['pass'] = '';                // Password for authentication 
  
$res=mysql_query("select nombres,email from email_temp",$link);
  while(
$row mysql_fetch_array($res)) 
  {
         
      
$send_params['recipients']   = $row["email"]; // The recipients (can be multiple) 
      
$send_params['headers']      = array( 
                                        
'From: [email protected]',    // Headers (no tocar)
                                        
'To: '.$row["email"].'''Subject: XXXXX' 
                                       
); 
      
$send_params['from']        = '';                                    // This is used as in the MAIL FROM: cmd
      
$send_params['body']        = "
              Hola "
.$row["nombres"].".\n  
              Le comunicamos que fue seleccionad@ para participar de XXXXX para:
    //Aca desería colocar una imagen.
             Atentamente XXXXX\n.
              "
;        
   
//}
   
if(is_object($smtp smtp::connect($params)) AND $smtp->send($send_params))
   { 
      
// Any recipients that failed (relaying denied for example) will be logged in the errors variable. 
      //print_r($smtp->errors); 
   
}
   else
   {
       
// The reason for failure should be in the errors variable 
       //print_r($smtp->errors); 
    
}
  }   
?>
Si pudiera darle alfun formato o color al texto del mail también sería de mucha ayuda , de antemano gracias