[thelist] [fwd] probelm with the "mail" function etc

Garry Charles grc-the-master@brain-cpu.freeserve.co.uk
Mon Apr 23 17:16:38 2001
---------------------------------------------
This message was held by thelist software and
is being manually forwarded by a list admin.
Please remember to send emails in plain-text
format only, or they will not reach thelist
until it is later forwarded by a list admin.
---------------------------------------------


Would someone be good enough to help me please, as I can not work out =
what is going on !
I'm trying to get a email form script working

Right, I'm running (on my computer) Apache web server, php4 and mysql =
etc.=20

For the 'mail' function to work properly my literature says the =
following

1) find the '[mail function]' section in your php.ini=20
2) modify the 'SMTP' and 'sendmail_from' lines in this section so that =
they
contain 'localhost' and (say) your email address respectively

I've done that !

-------------------------------------------------------------------------=
----------------------------------
Now, I've prepared the following htm file....
-------------------------------------------------------------------------=
----------------------------------



Your name :
Your email:

-------------------------------------------------------------------------= ---------------------------------- and here's my relevant php file.... -------------------------------------------------------------------------= ---------------------------------- <?php $msg.=3D"e-mail sent from"; $msg.=3D"sender's name :\t$username\n"; $msg.=3D"sender's email :\t$useremail\n"; $msg.=3D"message :\t$usermessage"; $to=3D"grc-the-master@brain-cpu.freeserve.co.uk"; $subject=3D"test email entry"; $mailheaders=3D"from: my web site "; $mailheaders.=3D" reply to: $useremail\n\n"; mail($to,$subject,$msg,$mailheaders); ?>

the following email has been sent...

"; echo "Your email - $useremail
"; echo "Your message - $usermessage
"; ?> Now then, the htm file correctly passes the information over to the php = file, the php file correctly displays the email information .......GREAT !!..... but = hold on, there's an=20 error message which I do not understand the error message being displayed (php file on screen) is Warning: Failed to Connect in c:\program files\apache = group\apache\htdocs\eform.php on line 12 (it's something to do with the 'mail' function line ...but what? ) TIA Gaz