![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
21/09/2009, 02:30
|
![Avatar de conkerick](http://static.forosdelweb.com/customavatars/avatar288860_1.gif) | | | Fecha de Ingreso: febrero-2009 Ubicación: WWW
Mensajes: 75
Antigüedad: 16 años Puntos: 2 | |
Respuesta: converti php html a texto en envio de email Código PHP: <?php
$destinatario = "[email protected]";
// CABECERAS PARA ENVIAR HTML EN EL CUERPO
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=UTF-8\r\n";
// INFORMACIÓN DE QUIEN ENVÍA EL MENSAJE
$headers .= "From: Charles <[email protected]>\r\n";
// DIRECCIÓN A LA QUE SE ENVÍA UNA COPIA OCULTA
$headers .= "Bcc: [email protected]\r\n";
$asunto = "Asunto del mensaje";
$cuerpo = "Aquí va todo el HTML del cuerpo";
// FUNCIÓN ENVIAR
$enviar = mail($destinatario,$asunto,$cuerpo,$headers);
if($enviar){
echo 'enviado';
}
else{
echo 'no enviado';
}
?> |