PDA

View Full Version : Send Files To Email Via Php




GoGoComputerz
Nov 13, 2008, 11:09 PM
I was needing help coding sending files to email via php. I know how to send form responses, but I'm not sure how to send files... This is the code I use to send form responses:


<?php
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;

mail( "email@email.com", "SubJect Line",
$message, "From: $email" );
header( "Location: thanks.html" );
?>



angelwatt
Nov 14, 2008, 06:19 AM
You'll need to attach the file as an attachment. See this tutorial for more information. (http://www.webcheatsheet.com/PHP/send_email_text_html_attachment.php)