mailtolink.js
Makes mailto:
links.
In the browser:
In a CommonJS environment like Node or Browserify:
var mailtoLink = ;console;
Examples
Generate a link for one email address:
// => mailto:esmeralda@example.com
Generate a link for multiple email addresses:
// => mailto:esmeralda@example.com,victoria@example.com
Generate a link with an email and a subject:
// => mailto:esmeralda@example.com?subject=%C2%A1Hola!
Generate a link with just a subject:
// => mailto:?subject=%C2%A1Hola!
Generate a link with a subject and a body:
// => mailto:?subject=Check%20out%20this%20photo&body=I%20thought%20you%20might%20really%20enjoy%20this%20photo%20of%20a%20store%20I%20found%3A%0D%0A%0D%0Ahttp%3A%2F%2Fexample.com%2Ftienda.jpg'
Generate a link with an email, a subject, a CC, a body, and some BCCs:
// => mailto:esmeralda@example.com?subject=Hi&cc=victoria@example.com&bcc=mom@example.com,dad@example.com&body=Hope%20you%20are%20doing%20well.