Skip to content
Branch: master
Clone or download
dependabot-preview and jlelse [Security] Bump lodash from 4.17.11 to 4.17.14 (#170)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.14. **This update includes security fixes.**
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.11...4.17.14)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Latest commit da13e08 Jul 11, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
admin [Security] Bump lodash from 4.17.11 to 4.17.14 in /admin (#168) Jul 11, 2019
data Use Webpack for Admin web interface Oct 24, 2018
gradle/wrapper Update dependencies Jun 29, 2019
public Fix index.html Sep 23, 2018
src/main/kotlin/jlelse/maily Minor style fixes Feb 19, 2019
tests Rewrite Routes for more clarity (Fixes #17) Jan 18, 2019
.drone.yml Update dependencies Apr 27, 2019
.gitignore
Dockerfile Change url of my website May 19, 2019
LICENSE Initial commit Apr 14, 2018
README.md Change url of my website May 19, 2019
build.gradle.kts
env.test Merge contributions by glenux (#1) Jul 28, 2018
form.html Merge contributions by glenux (#1) Jul 28, 2018
gradlew Update dependencies Apr 27, 2019
gradlew.bat Update dependencies Apr 27, 2019
manifest-develop.tmpl Update dependencies Apr 27, 2019
manifest.tmpl Update dependencies Apr 27, 2019
package-lock.json
package.json Update dependencies Jun 29, 2019
settings.gradle Rewrite to Kotlin Sep 16, 2018

README.md

Maily Form

Docker Pulls

Available on DockerHub

This is a self-hosted service you can use to place forms on static sites. It uses nodemailer and you can host it with Docker.

⚠️ It is currently in development and it's not advised to use in production yet.

Server parameters

To run the server, you must set a few environment variables from the list below.

Parameters that control email delivery

Name Type Default value Usage
SMTP_USER required - The SMTP user
SMTP_PASS required - The SMTP password
SMTP_HOST required - The SMTP host
SMTP_PORT required - The SMTP port
SMTP_SSL optional false If the SMTP server uses encryption
SMTP_AUTH optional false If the SMTP server uses authentication

Parameters that control email headers

Name Type Default value Usage
EMAIL_FROM required - The sender (ex: Forms forms@example.com)
EMAIL_TO required - Default recipient

Parameters that control the service

Name Type Default value Usage
PORT optional 8080 The port on which the server should listen
HOST optional "127.0.0.1" The host on which the server should listen
ALLOWED_TO optional the value of EMAIL_TO All allowed recipients
CORS_HEADER optional "*" The Access-Control-Allow-Origin CORS header

Parameters that control the admin panel

If you want to use the admin panel at /admin, you have to set this too:

Name Type Default value Usage
ADMIN_USER optional - Admin username
ADMIN_PASS optional - Admin password
ADMIN_REALM optional "Maily-Form Administration" Admin realm

Special form fields

Name Type Default value Usage
_to optional - Recipient, if ALLOWED_TO is set, it must be in that list, hidden
_replyTo optional - Email address which should be configured as replyTo, (most probably not hidden)
_redirectTo optional - URL to redirect to, hidden
_formName optional - Name of the form, hidden
_t_email optional - "Honeypot" field, not hidden, advised (see notice below)

You can find a sample in the form.html file.

Notice to the honeypot field: Maily Form offers the option to use a Honeypot field, which is basically another input, but it's hidden to the user with either a CSS rule or some JavaScript. It is very likely, that your public form will get the attention of some bots some day and then the spam starts. But bots try to fill every possible input field and will also fill the honeypot field. But Maily Form is really clever and refuses to send mails where the honeypot field is filled. So you should definitely use it.

Installation

You can simply start a Docker container with the parameters listed above. You can also use docker-compose.

Sample docker-compose.yml file for Maily Form:

version: '3'
services:
    forms:
        image: jlelse/maily-form
        container_name: forms
        restart: unless-stopped
        environment:
            - SMTP_USER=mail@example.com
            - SMTP_PASS=yourSUPERsecretPASSWORD123
            - SMTP_HOST=smtp.your-mail-provider.com
            - SMTP_PORT=587
            - SMTP_SSL=true
            - SMTP_AUTH=true
            - EMAIL_TO=mail@example.com
            - EMAIL_FROM="Forms forms@example.com"
            - ALLOWED_TO=mail1@example.com mail2@example.com
            - CORS_HEADER="example.com"
            - HOST=0.0.0.0

Authors

  • Original source code jlelse mainly for own purposes.
  • Contributors:

Licence

This project is under the GNU GENERAL PUBLIC LICENCE version 3

You can’t perform that action at this time.