Simple email script with PHP
73
Here is a simple PHP script for sending email.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
<?php // simple email script $name = stripslashes(trim($_POST["name"])); $email = stripslashes(trim($_POST["mail"])); $subject = stripslashes(trim($_POST["subject"])); $message = stripslashes(trim($_POST["message"])); $sendto = stripslashes(trim($_POST["maildest"])); $headers = "From: $name" . " <$email>" . "\r\n" . "Reply-To: " . "$email" . "\r\n" . "Content-type: text/html; charset=utf-8" . "\r\n" . 'X-Mailer: PHP/' . phpversion(); $sendmail = mail($sendto, $subject, $message, $headers); if($sendmail) { echo "Success!"; } else { echo "Failure!"; } ?> |
Show Support
Like our new Facebook Page to show support!