PHP Attachment through POST

I am currently using a main page that has a form declared as such...

action="mailSubmit.php" enctype="multipart/form-data">

[/html]The following is the contents of my mailSubmit.php file.



$to = "email";
$subject = "Online Credit Request";

$body = $body . "Course: ".$course."\nCollege/University: ".$college."\nProfessor: ".$professor."\nYear/Term: ".$year."\n\nCourse requestor information\nName: ".$name."\nEmail address: ". $email. "\nAddress:\n". $streetaddress."\n".$city.", ".$state." ".$zipcode."\nPhone Number: ". $number;
mail($to, $subject, $body)
?>[/php]My question is how do I modify my mailSubmit.php file to accept and send the specified file in the email it is sending.

Thanks in advance for any help!


  • edited August 2011
    I've found one that would would but would require me to install PEAR onto the server and I am not quite sure if I have the permissions to install stuff onto the server!
Sign In or Register to comment.