-
PHP Mail sample
HI there everyone,
I'm wondering if anyone has an example of PHP Mail webpage code that they could share with me. I need to get 'Required fields' implemented on my web pages so I am getting away from Blue Mail. I've tried to implement a PHP Mail web page, but nothing appears to happen, either in the way of displaying the form, or even submitting the e-mail.
Thanks! - Eric -
-
heres an example of one that im using...
<?php
$ForwardTo="larry @ elarroyoarlington .com, dean @ elarroyoarlington .com, deancombs @ gmail .com, bentace @ sbcglobal .net, paul @ elarroyoarlington .com";
$email=$_REQUEST['EmailAddr'];
$name=$_REQUEST["Name"];
$phone=$_REQUEST["Phone"];
$comment=$_REQUEST["Comments"];
$details='Name: '.$name."\n"
.'Phone: '.$phone."\n"
.'Comments: '.$comment."\n";
mail($ForwardTo,"El Arroyo Customer Contact",$details,"From:$email");
header("Location: thankyou.html");
?>
and in my over all head to make this work....
function verify(fm) {
if (fm.Name.value == "") {
alert("Please enter your name");
fm.Name.focus();
return false;
}
if (fm.EmailAddr.value == "") {
alert("Please enter your e-mail address");
fm.EmailAddr.focus();
return false;
}
if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(fm.EmailAddr.value))) {
alert("Your e-mail address does not appear to be valid. Please re-enter.");
return (false);
fm.EmailAddr.focus();
}
return (true);
}
check it out...
http: // elarroyoarlington .com/contactus.html
Last edited by Bob Barr; 04-11-2012 at 03:53 PM.
Reason: Live link and email disabled
-
The best thing is to go for a custom web form. Check this PHP contact form out with AJAX and Captcha validation: http://www.devzeal.com/contact-us/
If you like it, I can sell a copy to you.
-
Bob,
Thanks so much for the great information. It is exactly what I needed to know. I'm new to developing web pages so it took me a while to figure out that I needed to create a 'sendmail.php' object, but once I figured that out, I was good to go.
Thanks again so much! - Eric -
-
you can upload a yahei scripts, and have a try. if you have more qustion ,you can go to http: // www. bluehostbbs .com bbs ask.
Last edited by Bob Barr; 08-02-2012 at 08:14 PM.
Reason: Live link disabled
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules