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\baby\mail_result.php on line 16

<?php
$contact_us=1;
include("dbconnect.php");
include("funksione.php");
include("header.php");
include("left.php");
include("tbl_begin.php");
$from=$_POST['email'];
$sender=$_POST['name'];
$headers = 'From: $sender' . "\r\n" .
    'Reply-To: $from' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();			
$to = "a.fejza@hotmail.om";
$subject = "Hi!";
$body = $_POST['enquiry'];
if (mail($to, $subject, $body, $headers))
 {
  echo("<p>Message successfully sent!</p>");
 } else {
  echo("<p>Message delivery failed...</p>");
 }
include("tbl_end.php");
include("footer.php");
?>

Because you do not have a mail server running on your machine.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.