Hola a todos, mi pregunta es la siguiente:
Como hago para mandar un mail en formato HTML, con una tabla e imagenes mediante la funcion mail().
O sea, tengo un formulario de suscripcion y cuando uno se suscribe, se le envia un mail dandole la bienvenida.
Probe poniendo el codigo HTML en el parametro $mesaje de la funcion mail()
Código PHP:
$mail="[email protected]";
$maildestino="[email protected]";
$nombre="www.xxx.com";
$asunto="Mensaje desde www.xxx.com";
$mensajef="<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
<title>Mail desde www.xxx.com</title>
</head>
<body bgcolor=\"#000000\">
<table width=\"50\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td><img src=\"http://www.xxx.com/images_mail/mail_01.jpg\" width=\"600\" height=\"123\"></td>
</tr>
<tr>
<td><img src=\"http://www.xxx.com/images_mail/mail_02.jpg\" width=\"600\" height=\"93\"></td>
</tr>
<tr>
<td><img src=\"http://www.xxx.com/images_mail/mail_03.jpg\" width=\"600\" height=\"66\"></td>
</tr>
<tr>
<td><img src=\"http://www.xxx.com/images_mail/mail_04.jpg\" width=\"600\" height=\"67\"></td>
</tr>
<tr>
<td><img src=\"http://www.xxx.com/images_mail/mail_05.jpg\" width=\"600\" height=\"73\"></td>
</tr>
</table>
</body>
</html>";
$mailheaders = "From: ".$nombre." <".$maildestino."> \n";
$mailheaders .= "Reply-To: ".$maildestino."\n\n";
mail($mail,$asunto,$mensajef,$mailheaders);
pero me llega el codigo como texto.
Espero explicarme, muchas gracias.