ciao a tutti io tramite un libro di php ho creato un formail però ora ho un problema avendo il server di prova apache vorrei provare questo form ma mi da questo messaggio di errore:
html>
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:\Programmi\Apache Group\Apache2\htdocs\sendmail.php on line 14
there was an error....
il codice delle pagine php è sendmail
>html>
<head>
<title>Mail Sent</title>
</head>
<body>
<?php
$to = $_POST["info@wesolutionportal.it"];
$to = $_POST["from"];
$to = $_POST["subject"];
$to = $_POST["message"];
$headers = "from: " . $frum . "\r\n";
$mailent = mail($to, $subject, $message, $headers);
if ($mailent) {
echo "Congrats: the following message has been sent:
";
echo "To: $to
";
echo "From: $from
";
echo "subject:
";
echo $message;
} else {
echo "there was an error....";
}
?>
</body>
</html>
nell'altro postcard dove viene scritto il messaggio
<html
<head>
<title>Enter E-mail Data </title>title>
</head>
<body>
<form name="theform" method="post" action="sendmail.php">
<table>
<tr>
<td>To</td>
<td><input type="text" name="to" size="50"></td>
</tr>
<tr>
<td>From:</td>
<td><input type="text" name="from" size="50"></td>
</tr>
<tr>
<td>subjact:</td>
<td><input type="text" name="subjact" size="50"></td>
</tr>
<tr>
<td valign="top">Message:</tr>
<td>
<textarea cols="60" rows="10" name="message"
>enter your message here</textarea></td>
</tr>
<tr>
<td></td>
<td>
<input type="submit" value="send">
<input type="reset" value="reset the form">
</td>
</tr>
</table>
</form>
</body>
</html>
si puo risolvere questo problema?