ryan012 0 Report post Posted November 4, 2004 I am programming on a web site's contact form page, How can I mail the filled in information of the client to particular E-mail address? I tried form action="mailto:blah@blah", but it is running all right on my machine rather that other computer in our LAN. The error message I got is a connection failure error occurred. I noticed there are some form mail info on line, but I have no idea to figure out how is that works. Anybody have some experience on that? Thanks! Share this post Link to post Share on other sites
wannabeeaweak 0 Report post Posted November 4, 2004 well from wut i uderstand i think wut u need to do is setup a cgi script that takes the stuff that people input and sends it to your email. or u can go u this web site and wut they do is u just sign up and u just read there stuff on how to do it and they offer u to just fill out the form and u can get a cgi that when people input the stuff it send it to your emal. well the site is i think the site is http://www.vmcsatellite.com/rg-erdr.php?_rpo=t Share this post Link to post Share on other sites
farrooda 0 Report post Posted November 4, 2004 check this out http://phpformgen.sourceforge.net/ Share this post Link to post Share on other sites
overture 0 Report post Posted November 4, 2004 You can probably find something on the net. Look for "php sending emails mail()" this may bring up results. The Mail() bit is the function used to send the email along with the information that has been entered into the form. if u want my script then i will give it to you, but have a good stab at using the mail() function along with some security (htmlentities(), Strip_Tags()) and some validation so the email will not be sent if there is no message or email address or whatever. Share this post Link to post Share on other sites
ryan012 0 Report post Posted November 18, 2004 Thank you for your guys' reply, finnally, I wrote my own php script and got the running. The code is attached below, it is simple and anybody got some security suggestions based on that? Like regular expression check<?php @extract($_POST); $name = stripslashes($name); $email = stripslashes($email); $message = stripslashes($message); mail("blah@mail.co.nz",$subject,$message, "From: $name <$email>\r\n" . "Reply-To: $name <$email>\r\n" .); $message = str_replace("\n","<br>",$message); echo "The following message was sent:<br><br>"; echo "<b>From:</b> $name <".$email."><br>"; echo "<b>Subject</b> $subject<br>"; echo "<br><b>Message:</b><br>$message"; echo "<br><br>"; echo "<b>Thank You For Sending Me A Comment</b>"; ?> Share this post Link to post Share on other sites