Hi all. i need help from u. i use the mail function, but error displays. how to rectify. please help
the coding is
<?php
$to = "somebody@examp le.com";
$subject = "My subject";
$txt = "Hello world!";
$headers = "From: webmaster@examp le.com";
mail($to,$subje ct,$txt,$header s);
?>
the error is
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:\Program Files\xampp\htd ocs\textexample \mailfn.php on line 6
the coding is
<?php
$to = "somebody@examp le.com";
$subject = "My subject";
$txt = "Hello world!";
$headers = "From: webmaster@examp le.com";
mail($to,$subje ct,$txt,$header s);
?>
the error is
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:\Program Files\xampp\htd ocs\textexample \mailfn.php on line 6
Comment