Justtechjobs.com Find a programming school near you






Online Campus Both


php-install | 2002112

[PHP-INST] mail() and IIS5 - newbie question From: Steve Attwell (steveattwell <email protected>)
Date: 11/24/02

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 <email protected>";
$myreplyemail = "myemail <email protected>";

$contactname = "Mister Contact";
$contactemail = "myemail <email protected>";

$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.

-- 
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php