Whenever I try to send an IMAGE from a HTML page with help of external PHP code, the IMAGE sent as plain text...
Please help...
PHP code:`
$headers .= "MIME-Version: 1.0 \n";
$headers .= "Content-type: text/html; charset=iso-8859-1 \n";
$headers .= "from:".$_POST['gallery_form_name']."<".$_POST['gallery_form_email'].">";
$mail_body = "<table cellpadding='0' cellspacing='0' border='0'><tr><td>First Name : ".$_POST['gallery_form_name']."</td></tr>";
$mail_body .= "<tr><td>E-mail: ".$_POST['gallery_form_email']."</td></tr>";
$mail_body .= "<tr><td>Photo : ".$_POST['gallery_form_photo']."</td></tr></table>";
$mail_to = "banerjeeshubhajit@gmail.com";
if (@mail (nl2br($mail_to), $subject, $mail_body, $headers)) {
?>
<script type="text/javascript">
alert("Thank You! Your Photo Has Been Submited Successfully");
top.location.replace('http://neelamabasan.in/gallery');
</script>
<?php
} else {
print ("<h1><font color=\"#880000\">Sorry! An Error Occurred While Sending Message. Please Try Again</font></h1>");
}
} ?>`