this code for ppl to send text info from a text box to my email account:
// process the email
if (array_key_exists('send', $_POST)) {
$to = 'me@example.com'; // use your own email address
$subject = 'Feedback from the people';
// 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);
}
I keep getting this error: Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\wamp\www\journey\contact_us.php on line 26
how can I fix this?
Tags: