https://github.com/bendrucker/mailto-link
Generate a mailto protocol link
https://github.com/bendrucker/mailto-link
Last synced: about 1 year ago
JSON representation
Generate a mailto protocol link
- Host: GitHub
- URL: https://github.com/bendrucker/mailto-link
- Owner: bendrucker
- License: mit
- Created: 2015-09-08T02:36:41.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2021-03-30T17:05:00.000Z (over 5 years ago)
- Last Synced: 2025-07-14T07:17:30.178Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 11
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# mailto-link [](https://github.com/bendrucker/mailto-link/actions/workflows/test.yml)
> Generate a mailto protocol link
## Install
```
$ npm install --save mailto-link
```
## Usage
```js
var mailtoLink = require('mailto-link')
mailtoLink({to: 'bvdrucker@gmail', subject: 'Nice mailto lib'})
//=> mailto:bvdrucker@gmail.com?subject=Nice%20mailto%20lib
```
## API
#### `mailtoLink(options)` -> `string`
##### options
*Required*
Type: `object`
###### to / cc / bcc
Type: `string` / `array[string]`
List of emails to send to.
###### subject
Type: `string`
The email subject.
###### body
Type: `string`
The email body.
## License
MIT © [Ben Drucker](http://bendrucker.me)