Join 3,561 readers in helping fund MetaFilter (Hide)


How do I make an online form with email address inputs?
April 7, 2004 7:24 PM   Subscribe

I need javascript or html code for my website so that users can enter their email address in a box, hit send to send it to my inbox. It's so that they can receive notification of updates. I have searched high and low, but no luck.
posted by Quartermass to Computers & Internet (5 answers total)
 
You've looked high and low and had no luck because this is a hard problem. HTML (other than a mailto: link) won't cut it, and you're asking JavaScript (or some Java applet) -- running on the reader's browser -- to do the work of an SMTP server. Almost universally, this kind of thing is left to the web server or app server to do -- it's a couple of lines of PHP or mod_perl -- because frankly there isn't a whole lot you can do in the browser.

Since it sounds like you cannot or are not willing to run code on the web server, maybe there's a solution at Hosted Scripts that suits you instead? They seem to offer this:

Mailing List: Have your visitors sign up for your mailing list so that you can send them email updates.
posted by majick at 7:55 PM on April 7, 2004


There's always Notify List. You can put the form on your page and have it submit to them.
posted by fletchmuy at 7:58 PM on April 7, 2004


Most web serving packages come with something like formmail built in, even if you have a cheapo hosting account that doesn't give you access to running your own scripts/programs. Can you check your host's documentation for something like formmail.pl or cgiemail? If they have them installed, it should just be a simple matter of a few lines of form code on your web page.
posted by bcwinters at 8:42 PM on April 7, 2004


I'm with bcwinters. If your web host doesn't have formmail or an equiv you need a new host.
posted by dobbs at 9:05 PM on April 7, 2004


I haven't actually done this since the days of Netscape 3, but it used to be that if you make the action of a form a mailto: link, when the user submits the form their client will send an email with the query string in the body of the email. So if you have a form with two elements called "name" and "email," an email will be sent the looks something like this:

name=john+doe&email=jdoe@yahoo.com

I don't know if this works anymore with modern browsers, but its worth a try.
posted by mfbridges at 7:44 AM on April 8, 2004


« Older So, I'm looking at the back of...   |  Do you know about any do-it-yo... Newer »
This thread is closed to new comments.