mailtu
v1.0.0
Published
Create mailto: links programmatically
Downloads
465
Readme
mailtu
Generate mailto: links programmatically
Installation
Using npm npm i mailtu
Using yarn yarn add mailtu
Using pnpm pnpm add maitu
Usage
In CommonJS env
const { createMailTo } = require('mailtu');
Using imports
import { createMailTo } from 'mailtu';
Then
const mailToLink = createMailTo('[email protected]', {
subject: 'This is a test email',
body: 'It was generated with the mailtu NPM package'
});
// mailToLink is mailto:[email protected]?subject=This%20is%20a%20test%20email&body=It%20was%20generated%20with%20the%20mailtu%20NPM%20package
Available fields are: cc
, bcc
, subject
, body