Forum Moderators: skibum
<?
function send_html($from, $to, $subject, $text, $html)
{
global $debug;
if ($debug) echo "<HR>DEBUG¦From:$from¦To:$to¦Subject:$subject<HR>$text<HR>$html<HR>";
$headers = "From: $from\r\n";
$headers .= "Reply-To: $from\r\n";
$headers .= "X-Mailer: PHP/" . phpversion()."\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$boundary = uniqid("MAB");
$headers .= "Content-Type: multipart/alternative" .
"; boundary = $boundary\r\n\r\n";
$headers .= "$text\r\n\r\n";
$headers .= "--$boundary\r\n" .
"Content-Type: text/plain; charset=ISO-8859-1\r\n" .
"Content-Transfer-Encoding: base64\r\n\r\n";
$headers .= chunk_split(base64_encode("$text"));
$headers .= "--$boundary\r\n" .
"Content-Type: text/html; charset=ISO-8859-1\r\n" .
"Content-Transfer-Encoding: base64\r\n\r\n";
$headers .= chunk_split(base64_encode("$html"));
mail($to, $subject, "", $headers);
}
function parse_mail($mail, $param)
{
foreach ($param as $key=>$val)
$mail=str_replace("#".$key."#",$val,$mail);
return $mail;
}
?>
Thanks in advance
Best regards
VideoG