JSPM

mailsafeguard

1.4.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q44380F
  • License ISC

MailSafeGuard is a Node.js package designed to validate and detect disposable email addresses. It ensures email integrity by checking syntax, comparing against a whitelist of trusted providers, validating against a list of disposable domains, and performing DNS resolution. Ideal for filtering out temporary email addresses used for spam or fraudulent activities.

Package Exports

  • mailsafeguard
  • mailsafeguard/src/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mailsafeguard) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

MailsaFeGuard - Ultimate Email Validation and Filtering Tool 📧🚫

Welcome to MailsaFeGuard, the powerful Node.js package designed to ensure the integrity and legitimacy of email addresses. With MailsaFeGuard, you can effortlessly filter out disposable email addresses often used for spam or fraudulent activities. Say goodbye to unreliable email addresses and hello to cleaner, more trustworthy communications! 🌟📩

Features

1. Comprehensive Email Validation 📜✅

  • Syntax Validation: Ensures that the email format follows standard conventions.
  • Whitelist Check: Cross-references the email domain with a whitelist of trusted providers like Gmail, Outlook, and Yahoo.
  • Disposable Domain Check: Compares the domain against a list of known disposable email providers.
  • DNS Resolution: Verifies the existence and resolution of the email domain via DNS.

2. Easy-to-Use Interface 🖥️👌

  • Simple and intuitive API for seamless integration into your applications.
  • Clear and informative output for each email validation.

3. Reliable and Up-to-Date Information 🔄📅

  • Regularly updated list of disposable domains from a GitHub repository.
  • Robust DNS checks for domain verification.

How It Works

MailsaFeGuard follows a multi-step approach to ensure email legitimacy:

  • Syntax Validation: Verifies that the email address adheres to standard formatting rules.
  • Whitelist Check: Compares the email domain against a list of well-known, trusted email providers.
  • Disposable Domain Check: Fetches an updated list of disposable email domains from a GitHub repository to check against.
  • DNS Resolution: Ensures that the domain associated with the email address can be resolved through DNS, including its subdomains.

Installation

To get started with MailsaFeGuard, install it via npm:

npm install mailsafeguard


const { isDisposableEmail } = require('mailsafeguard');

// Validate an Email
async function checkEmail(email) {
    const result = await isDisposableEmail(email);
    if (result) {
        console.log(`${email} is from a disposable email provider.`);
    } else {
        console.log(`${email} is from a legitimate email provider.`);
    }
}

checkEmail('example@mailinator.com'); // Disposable
checkEmail('example@gmail.com');     // Legitimate