PHP script for sending e-mail

Here we have an example of how I can send e-mail using PHP - Php code

  <?php $email = $_POST["email"]; $name = $_POST["name"]; $subject = $_POST["subject"]; $msg = $_POST["msg"]; if ( !empty($email) && !empty($name) && !empty($subject) && !empty($msg) ) { $ToEmail = $email ; $ToSubject = $subject ; $EmailBody = $msg ; $Message = $EmailBody; $headers = "Content-type: text; charset=iso-8859-1\r\n"; $headers = "From:"."$name"."\r\n"; mail($ToEmail,$ToSubject,$Message, $headers); echo

E-mail Sent Successfully
 ' ; } else { echo ' 
Please Fill Out Required Field
' ; } ?>

 
HTML Code

// Send the name of the

// Send him e-mail

// // Subject of e-mail messages

Mail.php together to save the codes.
The code has a problem. Take a look at the code from my site.

Popular Posts