I'm trying to incorporate the php mail() function in an application I am writting.
I'm running Win 2000 Server. I've set up a new remote domain named localhost under IIS Admin and I've checked the Allow incoming mail to be relayed to this domain option.
I've added the following to the php.ini
[mail function]
; For Win32 only.
SMTP = localhost
I'm using the following script which I'm running from the DOS command line.
<?php
/ Display a text message /
$myname = "Me Myself";
$myemail = "myemail@earthlink.net";
$myreplyemail = "myemail@earthlink.net";
$contactname = "Mister Contact";
$contactemail = "myemail@earthlink.net";
$message = "hello from happy me";
$subject = "A mail not refused by Hotmail";
$headers = "MIME-Version: 1.0\r\n";
mail($contactemail, $subject, $message, $headers);
?>
I get the following error message...
D:\php>php email.php
X-Powered-By: PHP/4.2.2
Content-type: text/html
PHP Warning: Server Error in D:\php\email.php on line 16
Any ideas on where I'm going wrong? I am new to IIS and PHP.