Skip to content

exexzian/fwdform

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quickstart contact form processing

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

Usage

Register your email:

    $ curl --data "email=<your_email>" https://fwdform.herokuapp.com/register
    Token: 780a8c9b-dc2d-4258-83af-4deefe446dee
    

Test (optional):

    $ curl --data "email=person@form.com&name=person&message=hello" \
           https://fwdform.herokuapp.com/user/<token>

Put into action:

<form action="https://fwdform.herokuapp.com/user/<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">
</form> 

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 https://github.com/samdobson/fwdform.git
    $ 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()

About

Quickstart contact form processing for static sites

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 86.2%
  • HTML 13.8%