Could someone tell me how to put a box in my page that has just one line for one email address and when the person clicks send it sends an email to me with their email address on it so i can add it to my mailing list ?
Assuming you have php on your server... (You will need server side scripting) <?php if(isset($_POST[submit])) { mail('YOU@DOMAIN.com','New Email address (this is the subject)',$_POST['email'] . ' would like to be added to the list'); echo 'Your email has been added'; } else { ?> <form name="newEmail" action="<?=$_SERVER[PHP_SELF]?>" method="post" > <input type="text" name="email" value="" /> <input type="submit" name="submit" value="Go" /> </form> <?php } ?> PHP: I just wrote this up right now so no guaruntee that its bug free
That script is an open invitation to black hats. It would be trivial for anyone to use that script to send whatever to whomever—in other words, to spam the world. See http://www.securephpwiki.com/index.php/Email_Injection While that article is specific to PHP, it applies to PERL, Python or any other language you might choose. Do not use any mail script that hasn't been thoroughly vetted for security issues. cheers, gary
I understand. It's just a shame that the email standards, such as rfcs 822, 2821 and 2822 were written and adopted long before spam became an issue. They are sadly lacking in protection against misuse. That puts the onus on the script author, which is more than I can handle. @geekazoid: Check out tfmail. People I respect tell me it's a secure script. cheers, gary
<form name="frmName" action="mailto:your@email.id" enctype="text/plain" method="post" > <table> <tr> <td>Your Email :</td> <td><input type="text" name="email"></td> </tr> <tr> <td colspan=2><input type="submit" name="submit" value="Submit"></td> </tr> </table> </form> Hope it helps !!