El codigo resumidamente es el siguiente:
Código PHP:
/**
* GLOBALS
**/
if (isset($_POST[arrayOfclients])) $clients = $_POST[arrayOfclients];
if (isset($_POST[tosend])) $text = $_POST[tosend];
if (isset($_POST[id_modelo])) $idmod = $_POST[id_modelo];
$a_c = array();
$sel_media = "Select * from media where id_modelo = ".$idmod;
$res_media = mysql_query($sel_media);
$cursor_media = mysql_fetch_array($res_media);
/**
* CONFIG
**/
$fxhtml = '<table border="1" bgcolor="red" style="margin-left:30px"><thead>';
$fxhtml .= '<tr><th>';
$fxhtml .= 'Modelo: '.getModel($idmod);
$fxhtml .= '</th>';
$fxhtml .= '<th>';
$fxhtml .= 'Caracteristicas';
$fxhtml .= '</th>';
$fxhtml .= '</tr></thead>';
$fxhtml .= '<tr><td>';
$fxhtml .= '<img name="htfoto" alt="" src="'.$cursor_media[foto].'" />';
$fxhtml .= '</td><td width="600px">';
$fxhtml .= nl2br($text);
$fxhtml .= '</td></tr><tr><td align="center">www.aaa.es</td>';
$fxhtml .= '<td>Esperamos que esta información sea de su agrado.</td></tr></table>';
if ($clients) {
$em = explode(',',$clients);
reset($em);
foreach ($em as $c => $v) $v==1 ? $a_c[$c] = setEmailFromId($c) : null;
//echo '<font color="red">'.base_path.'</font>';
$mail->AddAttachment(base_path.'/fotos/'.$cursor_media[foto]);
sendEmail (array_values($a_c), "subject", $fxhtml, "From", "From Name");
}
se visualiza la foto. Como se hace esto ..... ????
Muchas gracias por todo.