Forum Moderators: coopster
All Im trying to do is to email an individual HTML web page by clicking on a button within the page.
What have is;
$address = "some email";
$subject = "some subject";
$handle = fopen ("http://www.some_url.com", "rb");
$contents = "";
do {
$data = fread($handle, 8192);
if (strlen($data) == 0) {
break;
}
$contents .= $data;
} while(true);
fclose ($handle);
mail($address, $subject, $contents);
But what happens is that the HTML comes through as a text email. Does anyone have any ideas?
Thanks,
mail($address, $subject, $contents,'Content-Type: text/html; charset=iso-8859-1');
More complex:
use the excellent mail class by Richard Heyes [phpguru.org]
San Garrafa