I have found a REALLY simple contact form, which i am trying to mail to my own email for testing.
But I havent tried this before so i am not sure how to set it up.
Hope someone can help me out!
I get this error:
( ! ) Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\enkeltwebdesign\send_contact.php on line 21
I havent set up anything, so was kind of expecting it to go crazy when i submitted.
Can someone hint me on how to setup the mail function correct?
My code looks like this, just the core contact stuff, and processing which might be wrong too :-/
// Contact subject
$subject = $_POST['subject'];
// Mail of sender
$header="from: $name <$mail_from>"; // This is wrong I think? Undefined variable?
// Enter your email address
$send_contact=mail($to,$subject,$message,$header); // This is wrong I think?
// Check, if message sent to your email
// display message "We've recived your information"
echo "Tak for din forespørgsel.";