Hello
I have a problem of using mail...
Here is my codes
<html>
<head>
<title>Email - form</title></head>
<body>
<form action="test_email.php" metthod="POST">
<P><strong>Your Name:</strong><BR><INPUT type="text" size="25" name="user"></p>
<P><strong>Your Email Address:</strong><BR> <INPUT type="text" size="25" name="email"></p>
<p><strong>Message:</strong><BR>
<textarea name="message" cols=30 rows=5></textarea></p>
<p><INPUT type="submit" value="send"></p>
</form>
</body>
</html>
<html>
<head>
<title>sending mail from the form in feedback</title></head>
<body>
<?php
echo "<P>Thank you, <B>$POST[user]</b>, for your message</p>";
echo "<P>Your email address is: <B>$POST[email]</b></p>";
echo "<P>Your message was:<BR>";
echo "$_POST[message] </p>";
//start building the mail string
$msg = "Name: $_POST[user]\n";
$msg .= "Email: $_POST[email]\n";
$msg .= "Message: $_POST[message]\n";
//set up the mail string
$recipient = "test@gmail.com";
$subject = "Form submission Results";
$mailheaders = "From: my web site <defaultaddress@yourdomain.com> \n";
$mailheaders = "Reply-TO: $_POST[email]";
//send the mail
mail($recipient, $subject, $msg, $mailheaders);
?>
</body>
</html>
In my php.ini
[mail function]
; For Win32 only.
SMTP = localhost
; For Win32 only.
sendmail_from = test@gmail.com
I get error message -
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\details\test_email.php on line 31
Please help to correct this problem
Phantom_max