NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming > CODE
Reload this Page Free Email Script

CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here.

Advanced Search
9 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 04-16-2007, 12:26 AM THREAD STARTER               #1 (permalink)
Account Suspended
Join Date: Apr 2007
Location: United Kindom
Posts: 201
cascadingstylez is on a distinguished road
 


Adoption

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.
????: NamePros.com http://www.namepros.com/code/317218-free-email-script.html

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);}

  ?>
cascadingstylez is offline  
Old 04-16-2007, 08:57 AM   #2 (permalink)
NamePros Regular
Join Date: Mar 2005
Posts: 442
paaaaaaaaaa is a jewel in the roughpaaaaaaaaaa is a jewel in the roughpaaaaaaaaaa is a jewel in the rough
 



good script. Thanks for sharing. What would be needed to get this to become a mass email script?
__________________
Please add to my rep points if i was helpful. Thanks.

Content management system and online shop software
paaaaaaaaaa is offline  
Old 07-19-2007, 12:23 AM   #3 (permalink)
NamePros Regular
Join Date: Feb 2004
Posts: 651
teclance is on a distinguished road
 



Hey,

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

http://www.tigerdirect.com/applicati...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.
__________________
Sincerely
Mike Kelly
teclance is offline  
Old 07-20-2007, 11:07 AM   #4 (permalink)
Danltn.com
 
Daniel's Avatar
Join Date: May 2007
Location: Danltn.com / Nottingham, UK
Posts: 1,201
Daniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond repute
 


Ethan Allen Fund Ethan Allen Fund
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/applicati...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?>">
????: NamePros.com http://www.namepros.com/showthread.php?t=317218
 <fieldset>
????: NamePros.com http://www.namepros.com/showthread.php?t=317218
 <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!
Last edited by Danltn; 07-20-2007 at 11:14 AM.
Daniel is offline  
Old 08-13-2007, 09:32 PM   #5 (permalink)
Account Suspended
Join Date: Jul 2007
Posts: 244
naseerhaider will become famous soon enough
 



thanks for sharing
naseerhaider is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


 
All times are GMT -7. The time now is 03:47 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger