OK Anthony you've got it 'working' - woo hoo! (BTW: to double-check settings, run phpinfo() again - they're in there (somewhere))
We've exchanged a flurry of msgs, now for the 'lecture': slow down and read carefully; work step-by-step, learn to walk from the simplest case first, and thereafter stride out into a run... </lecture> So your system appears to have transmitted a msg, but nothing much has happened/come back. (a) if the msg has gone out, but is malformed in some way, it may take some hours before 'the Internet' gets around to rejecting it and tossing it back at you, eg four hours/three days. If it's going to, that should have happened by now. (b) with the code below there is no way to tell if you have an immediate error or not - and in any case you have added a few 'extras' (contrary to the 'keep it simple' philosophy I espoused above. Recommendations: (1) since Julie's book was published there has been an upgrade to mail() (and numerous to PHP as a whole). Re-read that section of the book, and make basic notes on the technique (of using mail()), then put the book aside. Go to the online manual (should always be your first port of call anyway) and read the updated entry - firstly there is likely an 'extra' parameter, and secondly you can now get a response/result feedback AND TEST IT! (2) After reading the manual entry, compose a simple script, with no data entry/all constant values, and chuck the minimum number of arguments at mail(), to try to get at least 'something' back. (and thereafter start adding flowery labels, X-headers, etc - piece by piece) MAKE copious notes as you go - so you can 'follow the breadcrumbs' to backtrack... (3) Julie wrote her book and populated it with examples from some *NIX system. I don't recall any words of advice for Windows users (you're Win98 IIRC), but please re-read any such. In this case you have run foul of the *NIX 'newline' convention of \n (newline character, ASCII=10), whereas Windows uses a different convention (\r\n, CRLF = carriage return and line feed, ASCII 13 + ASCII 10) - and just for fun, let me mention that Macs are 'different' again... In other words, all of those \n characters (as per the current script, below) are going to trip up mail() and cause it to fail/fail to form the msg properly/cause you to miss out on the exquisite excitement of reading email you've sent to yourself... The wave is building under you, all you have to figure out now, is which way to stand on the board! =dn (sorry, that's surfing not fishing, and salt water not fresh...) > O.K. DL... > Thanks for the reply. > > And your time. :-{} > > Yes. I restarted Apache - it came up the same. > > It would seem that Apache works along with php4 since I get the > enviromental variables, etc. page when > > I go to: > > http://localhost/phpinfo.php > > which was saved as: > > <? > phpinfo() > ?> > > This is exactly what the lines in the [mail function] within my php.ini file > looks like: > > ................... > [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) > .................... > > which is what she advises on page 116 of her book. > > I have inserted: > > localhost > > and > > my e-mail address > > in the php.ini file. > > And I took the script - html and php - right off her CD and tested them on > a Win98 / Apache / OE 5 > > and got: > > ............................ > Warning: Failed to Connect in c:\program files\apache > group\apache\htdocs\send_simpleform.php on line 19 > > > // This is my php.ini file in WINDOWS > > [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) > > .................................... > > //...and 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> > > .............................. > > > > //and lastly... 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> > ..................................................... > > > ----- Original Message ----- > From: "DL Neil" : > > > Did you restart Apache after changing PHP.INI? > > > > Please post the mail() section of the script and the mail section of the > > PHP.INI. > > =dn > > > --- > [This E-mail scanned for viruses by gonefishingguideservice.com] > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php