in php, how to send the html tag to mail

Posted by zahir hussain on Stack Overflow See other posts from Stack Overflow or by zahir hussain
Published on 2010-03-15T06:40:55Z Indexed on 2010/03/15 6:49 UTC
Read the original article Hit count: 430

Filed under:
|
<script type="text/javascript">
var head= 23;
</script>

<?php
$h="<script language='javascript'> document.write(head);</script>";

$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=ISO-8859-1" . "\r\n";

 $mail_from='[email protected]';
 $name="husssain";
 $headers.="From: $name <$mail_from>";
 $con="Welcome to world";
 $to ="[email protected]";
 $send_contact = mail($to,$con,$h,$headers); 
?>

then i send the $h to my mail id but i recieve only this <script language='javascript'> document.write(head);</script>

© Stack Overflow or respective owner

Related posts about phpmail

Related posts about php