NamePros.Com (http://www.namepros.com/)
-   CODE (http://www.namepros.com/code/)
-   -   Free Email Script (http://www.namepros.com/code/317218-free-email-script.html)

cascadingstylez 04-16-2007 01:26 AM

Free Email Script
 
I have write a simple Copy and Paste script for other members to use on there websites. Its a basic contact form script. It has no styling, ive just created it simple and basic, but if you need it styled/changed id be willing to do so for a small $fee.

There are many ways to send mail, this is just one of them and works well. Copy and paste, upload to your web server and test it out.

Enjoy :)

Code:
<form method="post" action="<?php echo($PHP_SELF) ?>"> <fieldset> <legend>Email Form</legend> <p><label>Name:</label><input type="text" name="name" id="name"></p> <p><label>Email:</label><input type="text" name="email" id="email"></p> <p><label>Comments:</label><input type="text" name="comments" id="comments"></p> <p><input type="submit" name="submit" id="submit" value="Send Message"></p> </fieldset> </form> <?php # Add your email address $to = 'yourname@googlemail.com'; # Add a default subject $subject = 'You Have Mail From Your Website'; $name = $_REQUEST['name']; $email = $_REQUEST['email']; $comments = $_REQUEST['comments']; $submit = $_REQUEST['submit']; $body = "$name $email $comments"; if(isset($submit)) { mail($to, $subject, $body);} ?>

paaaaaaaaaa 04-16-2007 09:57 AM

good script. Thanks for sharing. What would be needed to get this to become a mass email script?

teclance 07-19-2007 01:23 AM

Hey,

I need a page feed back script for oscommerce. An example can be seen at tigerdirect near the bottom:

http://www.tigerdirect.com/applicat...=H24-RT901%20SB


I need the email it sends to included the link to the page that there at.

Please note the oscommerce script is php incase your unsure.

How much to do this?

thanks.

Daniel 07-20-2007 12:07 PM

Originally Posted by teclance
Hey,

I need a page feed back script for oscommerce. An example can be seen at tigerdirect near the bottom:

http://www.tigerdirect.com/applicat...=H24-RT901%20SB


I need the email it sends to included the link to the page that there at.

Please note the oscommerce script is php incase your unsure.

How much to do this?

thanks.



PHP Code:
<form method="post" action="<?php echo($PHP_SELF) ?>">
<
fieldset>
<
legend>Email Form</legend>
<
p><label>Name:</label><input type="text" name="name" id="name"></p>
<
p><label>Email:</label><input type="text" name="email" id="email"></p>
<
p><label>Comments:</label><input type="text" name="comments"  id="comments"></p>
<
p><input type="submit" name="submit" id="submit" value="Send Message"></p>
</
fieldset>
</
form>

<?
php
  
  
# Add your email address
  
$to = 'daniel@neville.tk';
  
# Add a default subject
  
$subject = 'You Have Mail From Your Website';
  
$loc = $_SERVER['PHP_SELF'];
  
$name = $_REQUEST['name'];
  
$email = $_REQUEST['email'];
  
$comments = $_REQUEST['comments'];
  
$submit = $_REQUEST['submit'];
  
$body = "You have received an email from $name \n ($email) \n \n $name wanted to tell you: $comments \n \n He sent this message from $loc";

  if(isset(
$submit)) {

  
mail($to, $subject, $body);}

  
?>


Example email

Code:
You have received an email from Daniel Neville (daniel@neville.tk) Daniel Neville wanted to tell you: I really like this product! He sent this message from /email.php


If you require it says the whole URL e.g. http://domain.com/file.php then please reply back! :)

naseerhaider 08-13-2007 10:32 PM

thanks for sharing


All times are GMT -7. The time now is 01:31 AM.
Site Sponsors
Advertise your business at NamePros

Powered by: vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0