

Contact Forms with Pure JavaScript - modfarm
https://squaresend.com/blog/sending-emails-with-javascript

======
scarecrowbob
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?

~~~
Lazare
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!).

~~~
scarecrowbob
Yes, I hadn't considered that... indeed, that's quite nice alternative to
rolling my own.

------
crabasa
Healthy discussion about this new service 3 days ago:

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

------
chesh
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.

------
motyard
Oh Not what I thought, Its not pure JS.

