Generate html and email it
Posted: Mon Oct 19, 2009 6:32 am
I want to send some newsletters and i have a script that generates the html page.
the problem is that incoming email appears as html code in outlook and some simple css style is not working in web mail clients.
I'm using tables to style it.
I don't know if this is the correct way to send a generated script as email so any advices on that whould be appreciated.
Code: Select all
ob_start();
include_once $newsletter[0];//list of available news letters..here i get the first.
$html = ob_get_contents();
ob_end_clean();
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n";
$headers .= 'From: <info@??????.com>' . "\r\n";
I'm using tables to style it.
I don't know if this is the correct way to send a generated script as email so any advices on that whould be appreciated.