I a using Sendmail.php with this code
<html>
<head>
<title>Mail Sent!</title>
</head>
<body>
<?php
$to = $_POST["to"];
$from = $_POST["from"];
$subject = $_POST["subject"];
$message = $_POST["message"];
$headers = "From: " . $from . "\r\n";
$mailsent = mail($to, $subject, $message, $headers);
if ($mailsent) {
echo "Congrats! The following message has been sent: <br><br>";
echo "<b>To:</b> $to<br>";
echo "<b>From:</b> $from<br>";
echo "<b>Subject:</b> $subject<br>";
echo "<b>Message:</b><br>";
echo $message;
} else {
echo "There was an error...";
}
?>
</body>
</html>
& my Form.php is following:
<html>
<head>
<title>Enter E-mail Data</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>Subject:</td>
<td><input type="text" name="subject" size="50"></td>
</tr>
<tr>
<td valign="top">Message:</td>
<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>
How shall i configure my PHP.ini in order to send the mails from this form.
Regards,
Vinod soable;
Email :
[email protected]
http://top10web.co.nr