Php Mail script! I am soo close but please help! PLEASE PLEASE PLEASE HELP! IM...

Jeff

New member
...BEGGING YOU>? Hello, I have a little private web page for my family and each person has their own page. On there page there is an Html form that says there name and their comment. Once they hit submit I want the email to come directly to me. I have uploaded this following PHP file but it isnt working and I might have a heart attack because ive been working on this for a week and can't get it. Please don't direct me to a link just help me work this out if there is a problem. The webhosting I have supports PHP and mail, but the server doesn't send good mail so I heard something called SMPT and I want to use Gmail and I already enabled POP but I don't know what to do pleaase! PLEAASE help Me!!




<?php


if($_POST['submit'])
{
$name = $_POST['name'];
$message = $_POST['message'];
if($name&&$message)
{

if(strlen($message)>=20)){

ini_set("SMPT", "smtp.gmail.com");
echo SMPT

$to = "[email protected]";
$subject = "Email from someone on your website :)";
$body = "This is an email from $name\n\n$message";
$headers = "From: [email protected]";

mail($to, $subject, $body, $headers);
die();
}
else
die("You didn't enter a long enough message! that's mean!");

}
else
die("You must enter a name and message!");


}
?>
 
Back
Top