I want to send an email with PHP when a user has finished filling in an HTML form and then emailing information from the form. I want to do it from the same script that disp
Here are the PHP mail settings I use:
//Mail sending function
$subject = $_POST['name'];
$to = $_POST['email'];
$from = "zenphoto@example.com";
//data
$msg = "Your MSG
\n";
//Headers
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=UTF-8\r\n";
$headers .= "From: <".$from. ">" ;
mail($to,$subject,$msg,$headers);
echo "Mail Sent.";