Is there anyway to include <style.css> so when the email is sent, the style parameters are invoked instead of outputting the code in plain text into the body of the email? (thats what happened when I tried file_get_contents(style.css) )
(I got it working by putting $css= "<style> ...</style>"; and inserting that into the message. But that would be messy for complex stylesheets)
help would be very appreciated.
(I got it working by putting $css= "<style> ...</style>"; and inserting that into the message. But that would be messy for complex stylesheets)
Code:
<?php
if ($submit2) {
$subject = "$title";
$mailheaders = "From: $emailfrom\n";
$mailheaders .= "Reply-to: $emailfrom\n";
$mailheaders .= "Content-Type: text/html; charset=iso-8859-1\n";
$fromEmail = "webmaster@domain.com";
$filestring = file_get_contents("[URL unfurl="true"]http://$http_host$request_uri");[/URL]
$webpage = stripslashes($filestring);
$msg = (
"Visit this Page <a href=\"[URL unfurl="true"]http://www.domain.com$request_uri\">http://www.domain.com$request_uri</a>\n"[/URL]
."$css\n"
."$webpage\n"
);
mail("$emailto", "$subject", "$msg", "$mailheaders", "-f $fromEmail");
echo("<font color=\"red\">Webpage Sent.</font>");
}
?>
help would be very appreciated.