I'm using this code to send mail to myself from a web page.
I want to attach a file to the email sent.
Can anyone help me?
I saw the artical on this site, and I don't understand it. I need code to look at, to understnd how it works. I've never been very good with books, manuals, and how-to's
<?
$subject = "{$_POST["subject"]}";
$message = "
<html>
<head>
<title>{$_POST["subject"]}</title>
</head>
<body>
Some links and text here
</body></html> ";
$headers = "From: MY.COM <me@my.com>\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
/* Attachments*/
$headers .= "Content-Type: image/jpeg; name={$_POST["attach"]}"
$headers .= "Content-Disposition: attachment; filename={$_POST["attach"]}"
mail("me@my.com", $subject, $message, $headers);
?>