# docpad-plugin-formmail

> DocPad plugin to handle form submissions and mail out their content.

Latest version **2.0.2** (published 2013-10-01) · 0 weekly downloads

## Install

```sh
npm install docpad-plugin-formmail
pnpm add docpad-plugin-formmail
yarn add docpad-plugin-formmail
bun add docpad-plugin-formmail
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2013-10-01 |
| First published | 2013-06-20 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.8 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Sparks Creative Limited |
| Maintainers | sparky |
| Keywords | docpad, docpad-plugin, form, mail |

## Links

- npm: https://www.npmjs.com/package/docpad-plugin-formmail
- Repository: https://github.com/Sparks-Creative-Limited/docpad-plugin-formmail
- Issues: https://github.com/Sparks-Creative-Limited/docpad-plugin-formmail/issues
- npm.io page: https://npm.io/package/docpad-plugin-formmail

## Dependencies (2)

- [captchagen](https://npm.io/package/captchagen.md) 0.0.2
- [nodemailer](https://npm.io/package/nodemailer.md) >=0.4.4

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 2.0.2 (latest) — 2013-10-01
- 2.0.1 — 2013-09-07
- 2.0.0 — 2013-06-20

## README

# FormMail Plugin for [DocPad](http://docpad.org)

A simple DocPad plugin which extends the server to handle posts to a configurable url and deliver it's contents to email
addresses with a configurable smtp account.
The typical usage scenario is adding a contact form to your DocPad site.


## Install

```
npm install --save docpad-plugin-formmail
```


## Usage

### Setup

Configure the path to be intercepted on your server, the success redirect path and the email details for sending out
form data in the DocPad configuration file. You can also enable Captcha form validation with additional configuration
options. A full configuration entry would look similar to:

```coffeescript
	plugins:
		formmail:
			path: '/contact',
			redirect: '/thanks',
			transport:
				service: 'Gmail',
				auth:
					user: 'noreply@example.com',
					pass: 'password'
			to: 'enquiries@example.com',
			captcha:
				image: '/captcha',
				redirect: '/tryagain',
				options:
					height: 150,
					width: 300
```

Where:

 - the `path` property should match the POST action on your site's form.
 - the `redirect` property (optional) references a valid route to following successful submission (defaults to '/').
 - the `to` property may be a list of destination email addresses for sending form submissions.
 - the `transport` property configures an SMTP transport instance using [nodemailer](http://www.nodemailer.com/).

 - the `captcha -> image` property sets the path to retrieve captcha images, e.g `<img src="/captcha" />`
 - the `captcha -> redirect` property (optional) references a valid route to following failed Captcha validation
 (defaults to '/')
 - the `captcha -> options` property sets options for generating images, as used by
  [captchagen](https://github.com/wearefractal/captchagen), such as image height and width.


## History
You can discover the history inside the `History.md` file



## License
Licensed under the incredibly [permissive](http://en.wikipedia.org/wiki/Permissive_free_software_licence) [MIT License](http://creativecommons.org/licenses/MIT/)
<br/>Copyright &copy; 2013+ [Sparks Creative Limited](http://www.sparks.uk.net)

---
_Source: https://npm.io/package/docpad-plugin-formmail · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
