-
Notifications
You must be signed in to change notification settings - Fork 0
Plugins
You can create plugins to extend SnowMail in the following ways:
- Add customized inputs (e.g. a captcha)
- Validate forms with more advanced validation criteria than SnowMail supports
- Send contact form submissions through a transactional email service provider (e.g. SendGrid) instead of SMTP
- Send contact form submissions through a webhook
- Run code whenever a form is saved (useful for triggering a website build)
Place plugin JARs in data/plugins
and restart SnowMail.
Some plugins that add custom inputs have a settings form. Fill out all required fields in this form before saving.
For information on creating your own plugins, see Developing Plugins.
A few official plugins are published alongside SnowMail.
Important
Keep these plugin versions in sync with SnowMail to avoid issues.
This plugin adds a captcha widget and validation code for reCAPTCHA.
To use, add the reCAPTCHA input to the form and fill out the settings form.
This plugin adds a captcha widget and validation code for SnowCaptcha.
To use, add the SnowCaptcha input to the form and fill out the settings form.
This plugin sends a POST request to the URL of your choice. After installing the plugin, a config file will be created in data/plugins/Webhook
. Modify the config file as needed and restart SnowMail.
The requests will have a JSON body:
-
submit
event:
{
"type": "submit",
"values": {
// "input-name" will be the name of the input
"input-name": {
"input": {
// Input object
},
// The value as a string
"value": "Lorem ipsum"
}
}
}
-
save
event:
{
"type": "save",
"form": {
// Form object
}
}