Hey ppl i recently started teaching myself php,
im running through a few simple projects to get my wits about it but iv run into a dead end.....
I have got a local webserver set up to test my work but im stuck on a mailfunction, i made a simple form to get user feed back heres the php command
// process the email
if (array_key_exists('send', $_POST)) {
$to = 'me@example.com'; // use your own email address
$subject = 'Feedback from Japan Journey site';
// process the $_POST variables
$name = $_POST['name'];
$email = $_POST['email'];
$comments = $_POST['comments'];
// build the message
$message = "Name: $name\n\n";
$message .= "Email: $email\n\n";
$message .= "Comments: $comments";
// limit line length to 70 characters
$message = wordwrap($message, 70);
// send it
$mailSent = mail($to, $subject, $message);
}
all the veriables are there and so on yet when i try to send it i get the error
Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\WEBSERVER\ROOT\php\contact.php on line 25
in my php.ini file i have set the option to my x10 mail setting
?? any help is very apreciated thanks
im running through a few simple projects to get my wits about it but iv run into a dead end.....
I have got a local webserver set up to test my work but im stuck on a mailfunction, i made a simple form to get user feed back heres the php command
// process the email
if (array_key_exists('send', $_POST)) {
$to = 'me@example.com'; // use your own email address
$subject = 'Feedback from Japan Journey site';
// process the $_POST variables
$name = $_POST['name'];
$email = $_POST['email'];
$comments = $_POST['comments'];
// build the message
$message = "Name: $name\n\n";
$message .= "Email: $email\n\n";
$message .= "Comments: $comments";
// limit line length to 70 characters
$message = wordwrap($message, 70);
// send it
$mailSent = mail($to, $subject, $message);
}
all the veriables are there and so on yet when i try to send it i get the error
Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\WEBSERVER\ROOT\php\contact.php on line 25
in my php.ini file i have set the option to my x10 mail setting
?? any help is very apreciated thanks