Send email with attachments using PHP mail()
To check how to send simple emails check the previous script.
To send emails with attachments do the following:
Create a file called form.php and type the following:
Create the file called subject.php and type the following:
$to $from $subject $message are variables and can be assigned any value.
Now test it. Open the form.php in the browser attach a file and submit. Your email should be send.
Note: Click here to read PHP mail with attachments in detail