I am trying to use the mail() function in my PHP script, but when I run the
script, nothing happens. I am using Windows XP with Apache. I have the
current versions of PHP 4, Apache 2, and MySQL.
I think I might have to make a configuration in my php.ini file to point to
the sendmail program or something. I don't know how to do that. Does
anybody think they can help me with this?
I want to be able to write a page that has a form, and then when the person
fills the form and submits it, it gets emailed to me.
Nick
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base target="right">
<title>Comment</title>
</head>
<body>
<?php
$comment = $_POST['comment'];
$email = $_POST['email'];
$toaddress = 'm*****@operamail.com';
$subject = 'Cool';
$mailcontent = $comment;
$fromaddress ='From: ma******@hotmail.com';
mail($toaddress, $subject, $mailcontent);
?>
</body>
</html>