mailer

This repository is outdated. Do not use it on production!

Mailer

It is a simple Node.js server which forwards all “POST” submission by email. No database, 100% server (Nodejs), just sends the submissions by email.

Jekyll Node.js Workflow GitHub License Version Discord

How to use?

You create your front-end and style. Let’s build anything you want, we’ll take the backend!

Example form

<form action="https://YOUR-DEPLOYED-APP/post" method="post" enctype="multipart/form-data">
  <label for="Email">Email
  <input id="Email" type="email" name="Email" required="true">
  </label>
  <label for="Name">Name
  <input id="Name" type="text" name="Name" required="true">
  </label>
  <input type="submit" value="Send">
</form>

Note: Whether you add a /post or another endpoint, the app will always handle your request

Deploy

Deploy the app to Heroku

Deploy to heroku

Config

Here are all the environment variables you can use

.env Description Required
MESSAGE Message to displayed after the form submission. May contain HTML. Default: ‘Thank you for your submission.’ :heavy_check_mark:
TO Email address to send the form to (your email) :heavy_check_mark:
FROM Email address to use as sender address :heavy_check_mark:
SITE_NAME Name of your site, will be displayed in the email title :x:
PORT Port to listen to for form submissions :x:
FORM Path to the HTML file containing the example form, defaults to /form.html :x:
EMAIL_HOST SMTP config: see these options here :heavy_check_mark:
EMAIL_PORT SMTP config: see these options here :heavy_check_mark:
EMAIL_USER SMTP config: see these options here :heavy_check_mark:
EMAIL_PASS SMTP config: see these options here :heavy_check_mark:

Development

Node.js Version

Jekyll Version (Docs)

To set up your environment to develop this page, run bundle install.

To test site, run bundle exec jekyll serve and open your browser at http://localhost:4000. This starts a Jekyll server using your config and the contents. As you make modifications, your site will regenerate and you should see the changes in the browser after a refresh.

Issues

If you have any issues with the page please create new issue here

Pull Requests

When submitting a pull request:

License

This project is licensed under the MIT. See the LICENSE file for details