This is how my code looks like . Can anyone please help me out to solve this problem
The error I got 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:\wamp\www\try \index.php on line 15
Code:
<?php
$to = "mail.example@gmail.com";
$from_header = "From: mail.example@gmail.com";
$subject="Hello test mail...";
$contents="Content";
mail($to, $subject, $contents, $from_header);
header("Location: $HTTP_REFERER");
?>
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\try \index.php on line 15
Comment