This repository has been archived by the owner. It is now read-only.
Quickstart contact form processing for static sites
Python HTML
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Quickstart contact form processing

Update 18-01-18: No longer functional following Mandrill decision to restrict service to Mailchimp subscribers. Archiving this repo for posterity.

This will be useful if...

  • You want to forward a simple contact form to your email
  • You have a (S3) static site and don't want to run a server


Register your email:

    $ curl --data "email=<your_email>"
    Token: 780a8c9b-dc2d-4258-83af-4deefe446dee

Test (optional):

    $ curl --data "" \

Put into action:

<form action="<token>">
  Email: <input type="text" name="name"><br>
  Name: <input type="text" name="email"><br>
  Message: <textarea name="message" cols="40" rows="5"></textarea>
  <input type="submit" value="Send Message">

NB: Required parameters are: email, name and message. Other parameters will be ignored.

Privacy concerns?

Spin up your own free Heroku instance. A Mandrill account required for email delivery.

    $ git clone
    $ heroku create
    $ heroku config:set MANDRILL_API_KEY=<KEY>
    $ heroku addons:add heroku-postgresql:dev
    $ heroku pg:promote HEROKU_POSTGRESQL_COLOR
    $ heroku ps:scale web=1

Deploy the application to your Heroku instance.

    $ git push heroku master

Create the database.

    $ heroku run python
    >>> from app import db
    >>> db.create_all()
    >>> exit()