Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/munrocape/staticcontact

Add a contact form to any website - no backend required
https://github.com/munrocape/staticcontact

Last synced: about 2 months ago
JSON representation

Add a contact form to any website - no backend required

Awesome Lists containing this project

README

        

#[Static Contact](http://www.staticcontact.com)

A form forwarder. Static Contact can replace the backend of a contact form so that you can put one on a static site and receive the email in your inbox.

##How-to

Simply change the action and method of a form to be `http://www.staticcontact.com/{your_email}`.

For historical purposes, GET is the default request method. If you wish to be RESTful, POST request methods are also supported.

Here is a sample form:

``` HTML









```

## Roll your own

This guide assumes a [Go environment](http://golang.org/doc/install) is already set up.

###First, clone the repo

```
$ git clone https://github.com/munrocape/staticcontact
```

###Next, get the relevant dependencies
```
$ go get github.com/keighl/mandrill
```

###Get accounts for services
This requires an account to [Heroku](https://heroku.com), and an API key for [Mandrill](https://mandrillapp.com).

Visit those sites and create accounts if you do not yet have them.

###Configure environment variables
`cd` into your local staticcontact directory. The linked buildpack is for revel applications.
```
$ heroku create -b https://github.com/robfig/heroku-buildpack-go-revel.git
$ heroku config:set MANDRILL_KEY={You get this from the Mandrill dashboard}
$ git push heroku master
```

Voila! Heroku should print out the URL of the corresponding application. Now, for a given contact form, point the action method to be `{heroku_url}/{your_email}`.