npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mailto-link-generator

v1.0.3

Published

Generate a mailto protocol link

Downloads

43

Readme

mailto-link-generator

A simple utility to generate mailto links for sending emails using Node.js.

Installation

npm install mailto-link-generator

#Usage

const mailtoLink = require('mailto-link-generator');

const options = { to: '[email protected]', cc: ['[email protected]', '[email protected]'], bcc: '[email protected]', subject: 'Hello World', body: 'This is the body of the email.', };

const link = mailtoLink(options); console.log(link);


# mailto-link-generator

A simple utility to generate `mailto` links for sending emails using Node.js.

## Installation

```bash
npm install mailto-link-generator
Usage
javascript
Copy code
const mailtoLink = require('mailto-link-generator');

// Example usage
const options = {
  to: '[email protected]',
  cc: ['[email protected]', '[email protected]'],
  bcc: '[email protected]',
  subject: 'Hello World',
  body: 'This is the body of the email.',
};

const link = mailtoLink(options);
console.log(link);

API

mailtoLink(options) Generates a mailto link based on the provided options.

Parameters options (Object): An object containing email options. to (String or Array of Strings): Recipient email addresses. cc (String or Array of Strings): Carbon copy email addresses. bcc (String or Array of Strings): Blind carbon copy email addresses. subject (String): Email subject. body (String): Email body.

Using a mailto link in HTML can expose email addresses to email harvesters and increase the likelihood of receiving spam. Here's why:

  1. Easy Extraction:

    • mailto links are easily readable by web crawlers and email harvesting bots. These automated programs scan websites for email addresses and add them to spam lists.
    • The straightforward structure of mailto links (e.g., <a href="mailto:[email protected]">) makes it easy for bots to identify and extract email addresses.
  2. No Obfuscation:

    • Unlike some JavaScript-based techniques or server-side solutions that can obfuscate email addresses, mailto links are plain text in the HTML source code. They don't provide any inherent protection against automated harvesting.
  3. Direct Connection:

    • mailto links open the default email client when clicked. This direct connection between the webpage and the email client makes it easy for spammers to identify and target active email addresses.
  4. Widespread Usage:

    • As mailto links are commonly used for legitimate purposes, email harvesters specifically target websites and pages where these links are prevalent. Including such links in your HTML code increases the likelihood of being harvested.

To minimize the risk of email harvesting and spam, consider using the VeilMail.io Mailto Link Generator . It's free. VeilMail hides your email address behind a non-intrusive form captcha that makes sure you are human and not a bot.

See it in use.

You can get reach me at https://veilmail.io/e/HyBkVK

Form Backend Service

Using a form backend service is preferable to a mailto link for these reasons:

  1. Validation: Ensures accurate and secure data.
  2. Security: Guards against vulnerabilities like XSS and CSRF.
  3. Storage: Organizes and manages form data effectively.
  4. Email Deliverability: Improves reliability compared to user's email client.
  5. Integration: Connects with various tools and services.
  6. Customization: Offers more control over workflows and notifications.
  7. Scalability: Handles large volumes of form submissions.
  8. User Experience: Provides better control over design and functionality.