RE: [PHP-ES] Enviar emails en html (no en texto plano)
| From: | Carlos Mayorga | Date: | Thu, 16 Nov 2000 12:38:42 +0000 |
| Subject: | RE: [PHP-ES] Enviar emails en html (no en texto plano) | ||
| References: | 1 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-3851@lists.php.net to get a copy of this message | ||
Yo hago lo siguiente:
Primero voy guardando el contenido html (a base de unirle
fragmentos)en un archivo txt. Tambien puedes ir añadiendo
a la variable $content las lineas de html.
<?
$bol = fopen("archivo_html.txt","r");
$content = fread($bol, filesize("archivo_html.txt"));
$content = str_replace("\\\"","\"",$content);
fclose($bol);
mail(direccion-destino@tuweb.com, "Asunto a enviar", $content, "From:
direccion-origen@tuweb.com\nContent-Type: text/html;\n");
?>