I use the following script to send html embedded emails, it works great, but now I need to send emails with attached files. After the user has submitted the form, the varible $userfile is created, I need to send the $userfile along with the email. How would I change this so that it could send the file. Thanx!
$xheaders .= \"From: StarDefender <Webmaster@stardefenders.com>\n\";
$xheaders .= \"X-Sender: <Webmaster@stardefenders.com>\n\";
$xheaders .= \"X-Mailer: PHP\n\"; // mailer
$xheaders .= \"X-Priority: 6\n\"; // Urgent message!
$xheaders .= \"Content-Type: text/html; charset=iso-8859-1\n\"; // Mime type
mail(\"$emailtowho\",
\"This is the subject\",
\"This is email message
$xheaders);