Jump to content
xisto Community
websaint

Let visitors email you! Simply the best emailer script

Recommended Posts

Hi!!! I just wanted to show you the very nice emailer script I've created for my site. The script lets your visitors email you just by filling out a form that you can place anywhere on your site. All you have to do is to copy and paste the script below. The only thing you'll have to change about it is the email adress where you want to recieve your form mails. This script has been working really well form me, and I hope it will for you as well. :) Good luck, and I hope you can make it work on your site!!! :)

<html><head><style type="text/css"> TD                 {font-family: Arial; color: #000000; font-size: 8pt;} INPUT           {font-family:Verdana;font-size:10pt;BACKGROUND-COLOR: #FFFFFF;color:#000000;} TEXTAREA         {font-family:verdana,helvetica,sans-serif;font-size:10pt;BACKGROUND-COLOR:#ffffff;color:#000000;} </style></head> <?php if ($action == "sendmail"){ $to=$recipient; $mess = "From: $name\n $message\n"; $mailheaders="Return-path: $name <$email>\n"; $mailheaders.="From: $name <$email>\n"; $mailheaders.="Reply-To: $email\n"; $sent=mail(trim($recipient), $subject, $mess, $mailheaders); if($sent){echo"<FONT SIZE=2 face=arial>Your Email has been sent to <B>$recipient</B></FONT>";}else{echo"<h1>The mail could not be sent! Sorry!</h1>";} } if ($action == ""){  ?>  <body bgcolor=#f5f5f5>   <table width=100% border=0 cellspacing=0 cellpadding=0>    <form name=mail method=post action="?action=sendmail">       <td width=59>Your Name:</td>       <td width=187>         <input type=text name=name size=28>       </td>     </tr>     <tr>       <td width=59>Your Email:</td>       <td width=187>         <input type=text name=email size=28>       </td>     </tr>       <tr>       <td width=59>Send To:</td>       <td width=187>         <input type=text name=recipient value="youremail@domain.com" size=28>       </td>     </tr><tr><td>Subject:</td><td>         <input type=text name=subject value="" size=28></td></tr><tr>         <td width=59>Message:</td>       <td width=187>         <textarea name=message wrap=VIRTUAL cols=85 rows=15></textarea>       </td>     </tr>     <tr>       <td width=59></td>       <td>         <input type=submit name=submit value=send mail!>       </td>     </tr>     </form>   </table> </body></html> <?php } ?>  

Share this post


Link to post
Share on other sites

Hi Guys,Specially, zero_xui for telling me the shortest route to learning PHP. You all will be relieved to know that I've installed PHP Triad ( MySQL, Apache ...... ) and writing PHP scripts to mke my multiframe web-pages really dynamic.I've learned PHP from the PHP manual from http://www.php.com/, and I've got 5 yrs of C, C++ programming experiance, so it is in all guns blazing.Bye,Bigyan

Share this post


Link to post
Share on other sites

in my opinion php is easier to learn than js, coz js have diff variety.start studying php coz it's more powerfull compared to js


Totally different. PHP is server side scripting while javascript is client scripting.

Share this post


Link to post
Share on other sites

Hey guys,You've forgotten the fact that most of the cool and not-so-cool effects are given in web pages using js only. It can really make a page alive and interactive to its fullest.Bye,Bigyan

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

×
×
  • 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.