Jump to content
xisto Community
Sign in to follow this  
ryan012

How To Set Up Form Mail

Recommended Posts

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

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

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.