thanks for the reply but i still need some help: PHP Version 4.0.6 -------------------------------- [mail function] ; For Win32 only. SMTP = localhost
; For Win32 only. sendmail_from = [EMAIL PROTECTED] ------------------------------------------- I get this error when i use the mail function on my local server (IIS 5.0, windows 2000 Pro). Maybe it's an IIS configuration problem. i'm really not sure. Error Warning: Server Error in F:\Inetpub\wwwroot\stowe\scripts\mail.php on line 42 Code <?php $to = '[EMAIL PROTECTED]'; $from = '[EMAIL PROTECTED]'; //Check if we have something POSTed by the form. if (isset($HTTP_POST_VARS)){ //Start with an empty body for the mail message $body = ''; //Iterate through all the POSTed variables, and add them to the message body. while (list($key, $value) = each($HTTP_POST_VARS)){ $body .= $key . ' = ' . $value . "\r\n"; } //Build up some nice From/Reply Headers $headers = "From: $from\r\n"; $headers .= "Reply-To: $from\r\n"; //Mail the message out. //Requires setting php3.ini sendmail path as per instructions $success = mail($to, "Posted " . date("m/d/Y"), $body, $headers); //LINE 42 //Always check return codes from functions. if ($success){ echo "<B><CENTER>Thank you for your input</CENTER></B>\n"; } else{ echo "<CENTER><B>Internal Error</B>: Your input was unprocessed.<BR>Contact $from</CENTER>\n"; } } ?> "Dl Neil" <[EMAIL PROTECTED]> wrote in message 06f601c1962f$e3841cc0$7b16100a@jrbrown">news:06f601c1962f$e3841cc0$7b16100a@jrbrown... > CJ, > > > i have a problem using the mail function on my server. > > win2000 Pro > > IIS 5.0 > > PHP Version 4.0.6 > > > > i'm not sure if it's a configuration problem with IIS or i'm missing > > something in the php.ini file. > > > The pre-requisite is that the php.ini file points to a visible SMTP server. Please review the [mail function] > section of that file. > If you have further questions please include that section, plus PHP version number in your reply. > > Regards, > =dn > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]