News for hackers. Stuff that matters.
Re:Contact Forms with Pure JavaScript by scarecrowbob on Friday April 26, 2013 @07:58PM (#5616195)
Not to quibble (actual question), but how is this any more "pure javascript" than most ajax-based email forms... it just submits the form to a server, which is pretty normal way of doing something like that, right?
Re:Contact Forms with Pure JavaScript by Lazare on Friday April 26, 2013 @10:45PM (#5616605)
Let's say you have some static landing pages on S3, and you want a contact form. How would you do it?

Normally you'd have a PHP/python/perl/ruby/node/whatever script listening on the server for an HTTP POST (or AJAX request, or RPC, or websocket, or whatever) that would send the mail for you. But this won't work here because S3.

Your first attempt at solving this will probably be to turn to Mandrill/Mailgun/Postmark/whatever, most of which have some easy way to send an email from javascript, but all of which have some secret API key you need to keep secret. Again, this won't work because S3.

The trick is to find someone who'll run a server for you that will accept messages over an HTTP interface and pass them along to a designated email address. And apparently Squaresend will do this, which is honestly pretty nice if you just want a contact form on your S3 hosted website (which is not that strange a need!).

Re:Contact Forms with Pure JavaScript by scarecrowbob on Saturday April 27, 2013 @12:06AM (#5616765)
Yes, I hadn't considered that... indeed, that's quite nice alternative to rolling my own.
Re:Contact Forms with Pure JavaScript by teraflop on Friday April 26, 2013 @07:59PM (#5616198)
Presumably, the difference is that Squaresend runs the server so you don't have to.
Re:Contact Forms with Pure JavaScript by crabasa on Friday April 26, 2013 @10:47PM (#5616612)
Healthy discussion about this new service 3 days ago:

http://news.ycombinator.com/item?id=5598852

Re:Contact Forms with Pure JavaScript by chesh on Saturday April 27, 2013 @11:07AM (#5617955)
At this developer portal https://developer.yummly.com/contact, hosted by 3scale, we created the contact form with Wufoo, which is great for fast results: http://www.wufoo.com/gallery/templates/forms/contact-form/

Of course it is a hosted solution just like squaresend, just another alternative to consider.

Re:Contact Forms with Pure JavaScript by motyard on Friday April 26, 2013 @10:48PM (#5616619)
Oh Not what I thought, Its not pure JS.