A alguien le ha pasado algo parecido y sabe decirme que hago mal? Alguien me sabe decir alguna otra forma de enviar mails con contenido HTML com php que no sea utilizando la funcion mail()?
Muchas gracias,
Jordi
Os pongo aquí el código. En este caso solo pongo imágenes y pasa lo que os comentaba, que algunas de ellas no aparecen en el mail después cuando lo recibo en el Outlook o Hotmail:
Código PHP:
$subject = 'subject mail';
$contenido = '<table width=\'412\' border=\'0\' align=\'center\' cellpadding=\'0\' cellspacing=\'0\'>';
$contenido .= '<tr valign=\'top\'>';
$contenido .= '<td><img src=\'http://www.nombredominio.com/img/img_envio1.gif\' width=\'26\' height=\'76\'></td>';
$contenido .= '<td><img src=\'http://www.nombredominio.com/img/img_envio2.gif\' width=\'92\' height=\'76\'></td>';
$contenido .= '<td><img src=\'http://www.nombredominio.com/img/img_envio3.gif\' width=\'185\' height=\'76\'></td>';
$contenido .= '<td><img src=\'http://www.nombredominio.com/img/img_envio4.gif\' width=\'72\' height=\'76\'></td>';
$contenido .= '<td><img src=\'http://www.nombredominio.com/img/img_envio5.gif\' width=\'37\' height=\'76\'></td>';
$contenido .= '</tr>';
$contenido .= '</table>';
$contenido .= '<table width=\'412\' border=\'0\' align=\'center\' cellpadding=\'0\' cellspacing=\'0\'>';
$contenido .= '<tr valign=\'top\'>';
$contenido .= '<td><img src=\'http://www.nombredominio.com/img/img_envio6.gif\' width=\'26\' height=\'8\'></td>';
$contenido .= '<td><img src=\'http://www.nombredominio.com/img/img_envio7.gif\' width=\'92\' height=\'8\'></td>';
$contenido .= '<td><img src=\'http://www.nombredominio.com/img/img_envio8.gif\' width=\'185\' height=\'8\'></td>';
$contenido .= '<td><img src=\'http://www.nombredominio.com/img/img_envio9.gif\' width=\'72\' height=\'8\'></td>';
$contenido .= '<td><img src=\'http://www.nombredominio.com/img/img_envio10.gif\' width=\'37\' height=\'8\'></td>';
$contenido .= '</tr>';
$contenido .= '</table>';
$contenido .= '<table width=\'412\' border=\'0\' align=\'center\' cellpadding=\'0\' cellspacing=\'0\'>';
$contenido .= '<tr valign=\'top\'>';
$contenido .= '<td><img src=\'http://www.nombredominio.com/img/img_envio11.gif\' width=\'26\' height=\'14\'></td>';
$contenido .= '<td><img src=\'http://www.nombredominio.com/img/img_envio12.gif\' width=\'92\' height=\'14\'></td>';
$contenido .= '<td><img src=\'http://www.nombredominio.com/img/img_envio13.gif\' width=\'185\' height=\'14\'></td>';
$contenido .= '<td><img src=\'http://www.nombredominio.com/img/img_envio14.gif\' width=\'72\' height=\'14\'></td>';
$contenido .= '<td><img src=\'http://www.nombredominio.com/img/img_envio15.gif\' width=\'37\' height=\'14\'></td>';
$contenido .= '</tr>';
$contenido .= '</table>';
$contenido .= '<table width=\'412\' border=\'0\' align=\'center\' cellpadding=\'0\' cellspacing=\'0\'>';
$contenido .= '<tr valign=\'top\'>';
$contenido .= '<td><img src=\'http://www.nombredominio.com/img/img_envio16.gif\' width=\'26\' height=\'17\'></td>';
$contenido .= '<td><img src=\'http://www.nombredominio.com/img/img_envio17.gif\' width=\'92\' height=\'17\'></td>';
$contenido .= '<td><img src=\'http://www.nombredominio.com/img/img_envio18.gif\' width=\'185\' height=\'17\'></td>';
$contenido .= '<td><img src=\'http://www.nombredominio.com/img/img_envio19.gif\' width=\'72\' height=\'17\'></td>';
$contenido .= '<td><img src=\'http://www.nombredominio.com/img/img_envio20.gif\' width=\'37\' height=\'17\'></td>';
$contenido .= '</tr>';
$contenido .= '</table>';
$contenido .= '<table width=\'412\' border=\'0\' align=\'center\' cellpadding=\'0\' cellspacing=\'0\'>';
$contenido .= '<tr valign=\'top\'>';
$contenido .= '<td><img src=\'http://www.nombredominio.com/img/img_envio21.gif\' width=\'26\' height=\'22\'></td>';
$contenido .= '<td><img src=\'http://www.nombredominio.com/img/img_envio22.gif\' width=\'92\' height=\'22\'></td>';
$contenido .= '<td><img src=\'http://www.nombredominio.com/img/img_envio23.gif\' width=\'185\' height=\'22\'></td>';
$contenido .= '<td><img src=\'http://www.nombredominio.com/img/img_envio24.gif\' width=\'72\' height=\'22\'></td>';
$contenido .= '<td><img src=\'http://www.nombredominio.com/img/img_envio25.gif\' width=\'37\' height=\'22\'></td>';
$contenido .= '</tr>';
$contenido .= '</table>';
$header = "From:direccion@mail\nReply-To:direccion@mail\n";
$header .= "X-Mailer:PHP/".phpversion()."\n";
$header .= "Mime-Version: 1.0\n";
$header .= "Content-type: text/html; charset=iso-8859-1\r\n\r\n";
$mymail = "mail@destino";
mail($mymail, $subject, $contenido ,$header);