Anthony, > I'm not sure I understand.
=that makes one more! This feature is a bit of a minefield - but once you get a handle on it, its too useful to be without... > I had this working a few months ago by changing the php.ini settings to: > SMTP = localhost ;for win32 only > sendmail_from = [EMAIL PROTECTED] ;for win32 only > and I was able to run that script on my box and get an e-mail returned to > me. > Now, I getting a "failed to connect". > I'm using MS OE5. =this can only work if: a) there is an SMTP server on the localhost (and the DNS finds it), or b) the code wrapped around mail() specifies a valid and reachable SMTP server, or c) the code sidesteps the PHP mail facility completely by doing something else, or d) its not a Win box (and needs a completely different approach) =if it was working, it was working; I'm not sure what has been updated/replaced since - but let's not even go down that track. =I assume that the Win98 machine has outbound email working from some MTA, eg Outlook [Express]. Check its definition for an SMTP server. Cut-and-paste from there into PHP.INI. =also (because I'm a simple boy), forget all the optional headers etc, just use a stripped down/simple email stub-script for testing/proving. =If PHP's mail() can be persuaded to work, thereafter it (and any scripts) can be 'tweaked'/made better - or we can look back and compare... =dn > ----- Original Message ----- > From: "DL Neil" <[EMAIL PROTECTED]> > To: "Anthony Ritter" <[EMAIL PROTECTED]>; > <[EMAIL PROTECTED]> > Sent: Friday, December 06, 2002 10:37 AM > Subject: Re: [PHP] mail() problems... > > > > Anthony, > > > > Do you have an SMTP server on your Win98 localhost? > > Recommend you change the PHP.INI SMTP= to say the same as your email > > package's server definitions. > > > > =dn > > > > > > > > > I'm using MS Win98 and Apache and getting the following after submitting > > the > > > mail form: > > > .......... > > > Warning: Failed to Connect in c:\program files\apache > > > group\apache\htdocs\send_simpleform.php on line 14 > > > ............ > > > > > > The html and php scripts follow along with my php.ini settings. > > > > > > Any help would be appreciated. > > > > > > Thank you. > > > Tony Ritter > > > > > > The following e-mail has been sent: > > > Your Name: > > > Linda > > > > > > Your E-Mail Address: > > > [EMAIL PROTECTED] > > > > > > Message: > > > Test > > > ............................. > > > > > > > > > //this is the html form > > > > > > <HTML> > > > <HEAD> > > > <TITLE>Simple Feedback Form</TITLE> > > > </HEAD> > > > <BODY> > > > > > > <FORM METHOD="post" ACTION="send_simpleform.php"> > > > > > > > > > <P><strong>Your Name:</strong><br> > > > <INPUT type="text" NAME="sender_name" SIZE=30></p> > > > > > > <P><strong>Your E-Mail Address:</strong><br> > > > <INPUT type="text" NAME="sender_email" SIZE=30></p> > > > > > > <P><strong>Message:</strong><br> > > > <TEXTAREA NAME="message" COLS=30 ROWS=5 WRAP=virtual></TEXTAREA></p> > > > > > > <P><INPUT TYPE="submit" NAME="submit" VALUE="Send This Form"></p> > > > > > > </FORM> > > > > > > </BODY> > > > </HTML> > > > .............................. > > > //this is the php script > > > <? > > > if (($sender_name == "") && ($sender_email == "") && ($message == "")) { > > > header("Location: http://localhost/simple_form.html"); > > > exit; > > > } > > > $msg = "E-MAIL SENT FROM WWW SITE\n"; > > > $msg .= "Sender's Name: $sender_name\n"; > > > $msg .= "Sender's E-Mail: $sender_email\n"; > > > $msg .= "Message: $message\n\n"; > > > $to = "[EMAIL PROTECTED]"; > > > $subject = "Web Site Feedback"; > > > $mailheaders = "From: My Web Site <> \n"; > > > $mailheaders .= "Reply-To: $sender_email\n\n"; > > > mail($to, $subject, $msg, $mailheaders); > > > ?> > > > <HTML> > > > <HEAD> > > > <TITLE>Simple Feedback Form Sent</TITLE> > > > </HEAD> > > > <BODY> > > > <H1>The following e-mail has been sent:</H1> > > > <P><strong>Your Name:</strong><br> > > > <? echo "$sender_name"; ?> > > > <P><strong>Your E-Mail Address:</strong><br> > > > <? echo "$sender_email"; ?> > > > <P><strong>Message:</strong><br> > > > <? echo "$message"; ?> > > > </BODY> > > > </HTML> > > > ................ > > > My php.ini settings are: > > > > > > [mail function] > > > SMTP = localhost ;for win32 only > > > sendmail_from = [EMAIL PROTECTED] ;for win32 only > > > ;sendmail_path = ;for unix only, > > > may supply arguments as well (default is sendmail -t) > > > > > > > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > --- > > [This E-mail scanned for viruses by gonefishingguideservice.com] > > > > > > --- > [This E-mail scanned for viruses by gonefishingguideservice.com] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php