I had a Jekyll site (static, on GH pages) which needed to post a form and have an email be sent. Just a simple contact form. This app can be deployed and used as a service to receive the form post and send the email. It is made to work with Heroku out of the box.
Post a form to the root path of your mailbucket app. You can include the following parameters (all are optional):
- subject - The subject of the email. Will be blank if not provided.
- name - The name of the sender.
- email - The email address of the sender.
- redirect - The URL to redirect to after sending the email. Redirects to the referrer if not provided.
All remaining parameters will be formatted and used as the body of the email.
heroku create mymailbucket
git push heroku
heroku addons:add sendgrid:free
heroku config:add MAIL_RECIPIENT:[email protected]