Cross-language email validation. Backed by a database of over 38 000 throwable email domains.

Overview

MailChecker

PyPi version PyPI - Downloads

Cargo version Crates.io

NPM version npm

Gem version Gem

Packagist version Packagist

GoDoc

Get help on Codementor available-for-advisory extra Slack

Cross-language email validation. Backed by a database of over 38 000 throwable email domains.

This will be very helpful when you have to contact your users and you want to avoid errors causing lack of communication or want to block "spamboxes".


Need to embed a charts into an email?

It's over with Image-Charts, no more server-side rendering pain, 1 url = 1 chart.

https://image-charts.com/chart?
cht=lc // chart type
&chd=s:cEAELFJHHHKUju9uuXUc // chart data
&chxt=x,y // axis
&chxl=0:|0|1|2|3|4|5| // axis labels
&chs=873x200 // size

Use Image-Charts for free


Upgrade from 1.x to 3.x

Mailchecker public API has been normalized, here are the changes:

  • NodeJS/JavaScript: MailChecker(email) -> MailChecker.isValid(email)
  • PHP: MailChecker($email) -> MailChecker::isValid($email)
  • Python
import MailChecker
m = MailChecker.MailChecker()
if not m.is_valid('[email protected]'):
  # ...

became:

import MailChecker
if not MailChecker.is_valid('[email protected]'):
  # ...

MailChecker currently supports:


Usage

NodeJS

var MailChecker = require('mailchecker');

if(!MailChecker.isValid('[email protected]')){
  console.error('O RLY !');
  process.exit(1);
}

if(!MailChecker.isValid('myemail.com')){
  console.error('O RLY !');
  process.exit(1);
}

JavaScript

">
<script type="text/javascript" src="MailChecker/platform/javascript/MailChecker.js">script>
<script type="text/javascript">
if(!MailChecker.isValid('[email protected]')){
  console.error('O RLY !');
}

if(!MailChecker.isValid('myemail.com')){
  console.error('O RLY !');
}
script>

PHP

include __DIR__."/MailChecker/platform/php/MailChecker.php";

if(!MailChecker::isValid('[email protected]')){
  die('O RLY !');
}

if(!MailChecker::isValid('myemail.com')){
  die('O RLY !');
}

Python

pip install mailchecker
# no package yet; just drop in MailChecker.py where you want to use it.
from MailChecker import MailChecker

if not MailChecker.is_valid('[email protected]'):
    print "O RLY !"

Django validator: https://github.com/jonashaag/django-indisposable

Ruby

require 'mail_checker'

unless MailChecker.valid?('[email protected]')
  fail('O RLY!')
end

Rust

 extern crate mailchecker;

assert_eq!(true, mailchecker::is_valid("[email protected]"));
assert_eq!(false, mailchecker::is_valid("\n[email protected]\n"));
assert_eq!(false, mailchecker::is_valid("[email protected]"));

Elixir

Code.require_file("mail_checker.ex", "mailchecker/platform/elixir/")

unless MailChecker.valid?("[email protected]") do
  raise "O RLY !"
end

unless MailChecker.valid?("myemail.com") do
  raise "O RLY !"
end

Clojure

; no package yet; just drop in mailchecker.clj where you want to use it.
(load-file "platform/clojure/mailchecker.clj")

(if (not (mailchecker/valid? "[email protected]"))
  (throw (Throwable. "O RLY!")))

(if (not (mailchecker/valid? "myemail.com"))
  (throw (Throwable. "O RLY!")))

Go

package main

import (
  "log"
  
  "github.com/FGRibreau/mailchecker/platform/go"
)

if !mail_checker.IsValid('myemail@yopmail.com') {
  log.Fatal('O RLY !');
}

if !mail_checker.IsValid('myemail.com') {
  log.Fatal("O RLY !")
}

Installation

Go

go get https://github.com/FGRibreau/mailchecker

NodeJS/JavaScript

npm install mailchecker

Ruby

gem install ruby-mailchecker

PHP

composer require fgribreau/mailchecker

We accept pull-requests for other package manager.

Data sources

TorVPN

  $('td', 'table:last').map(function(){
    return this.innerText;
  }).toArray();

BloggingWV

  Array.prototype.slice.call(document.querySelectorAll('.entry > ul > li a')).map(function(el){return el.innerText});

... please add your own dataset to list.txt.

Regenerate libraries from list.txt

Just run (requires NodeJS):

npm run build

Development

Development environment requires docker.

# install and setup every language dependencies in parallel through docker
npm install

# run every language setup in parallel through docker
npm run setup

# run every language tests in parallel through docker
npm test

Backers

Maintainers

These amazing people are maintaining this project:

Sponsors

No sponsors yet! Will you be the first?

Patreon donate button Gratipay donate button Flattr donate button PayPal donate button crypto donate button

Contributors

These amazing people have contributed code to this project:

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

Changelog

License

Unless stated otherwise all works are:

and licensed under:

Comments
  • Go implementation

    Go implementation

    I am currently working on a Go implementation in my fork and most of the code and tests are done.

    The problem I am facing is how the code for each language implementation is generated from a template. For example, in the Go implementation, we would have mail_check.tmpl.go which generated mail_check.go under the platforms/go directory.

    The problem with this is that Go automatically looks at all .go files in a directory and considers them to be a package. In this case, attempts to use the Go implementation would fail since it will see 2 sets of the same functions implemented in the package as well as invalid syntax due to the mustache placeholders.

    Go does allow the use of build tags such as // +build ignore to ignore a file during the compilation of binaries, but there isn't a way to get this to work because if we include the build tag in the mail_check.tmpl.go file, it will be copied over to the mail_check.go file, which means the library will never build.

    I think one solution is to add an exception for Go to generator.js file, but it obviously won't be a very nice solution as we are introducing these exceptions.

    enhancement 
    opened by F21 14
  • remove dbmail.com

    remove dbmail.com

    "dbmail.com" is a legitimate email domain and doesn't offer disposable emails.

    Please remove the blacklist, we have many customers using this domain address and this breaks our communication services.

    opened by danmihai89 9
  • Added domains from cock.li

    Added domains from cock.li

    https://cock.li/register

    By the way, when I have free time I would like to write a script for adding new entries to list.txt where you can merge two lists or individual domains together, and it will do something along the lines of the Unix command sort -u list.txt (-u for unique). It would make life so much easier.

    Also, thank you for making this. I'm using the node module in production already!

    opened by makifoxgirl 8
  • gmailnator.com - change of logic required

    gmailnator.com - change of logic required

    PR #289 adds the gmailnator.com domain

    However, looking at gmailnator.com, the problem is that they create gmail addresses.

    So, the logic would need to change. Eg they generate

    [email protected]

    which means that [email protected] needs to be blocked.

    They are using the gmail-+ trick: https://gmail.googleblog.com/2008/03/2-hidden-ways-to-get-more-from-your.html

    opened by michield 6
  • Switch to plain text list

    Switch to plain text list

    Hi Francois-Guillaume!

    Have you considered switching from list.json to plain text file (one line — one domain, probably with # or // for commented lines)? This giant array-of-arrays json is getting really hard to deal with.

    enhancement 
    opened by nalgeon 6
  • Remove snkmail.com and sneakemail.com

    Remove snkmail.com and sneakemail.com

    Was previously requested in #108.

    Please remove snkmail.com. Although it started out as a disposable email service (sneakemail.com), snkmail.com is a paid-subscription service for generating long-lived unique email addresses for different purposes.

    Emails to the generated address is forwarded to the subscriber with the email tagged so that he knows which email it was sent to, and with the From address altered so that replies go back via snkmail servers and to the original sender. So this is really a service for identifying spam from websites, and not for generating disposable emails.

    While Sneakemail bills itself as a "disposible email address" service, the addresses do not expire, they are valid until the user deletes them. Most people only delete the addresses if unsubscribe fails.

    The idea is that rather than trying to filter spam (generally people whitelist everything coming through sneakemail), you have have one email address per sender. If a sender turns out to be bad (or they get hacked), you just turn that address off.

    opened by ryancdotorg 6
  • Please consider uploading Python version to pypi package index

    Please consider uploading Python version to pypi package index

    I know that dropping implementation in my git repository is easy enough, but keeping it up to date requires me to keep separate workflow than the rest of my dependencies (that are downloaded from pip).

    If you need any help with implementing I'd be happy to help.

    opened by jbzdak 6
  • Remove fastmail.fm provider as it is legitimate

    Remove fastmail.fm provider as it is legitimate

    We have active users with our product with that email provider, and they're legitimate users. Also fastmail.fm doesn't offer you to create disposable emails.

    opened by kennym 6
  • Eliminate false positives

    Eliminate false positives

    opened by R-J 6
  • tempmailaddress.com is not handled

    tempmailaddress.com is not handled

    opened by Jacketbg 5
  • Missing npm-run-all

    Missing npm-run-all

    Latest build [email protected] has an error. See below

    Compiling libraries from templates...
    [ loaded:list ]	 5228
    [ compiling:template ]	 mailchecker.tmpl.clj
    [ compiling:template ]	 mail_checker.tmpl.ex
    [ compiling:template ]	 MailChecker.tmpl.js
    [ compiling:template ]	 index.tmpl.js
    [ compiling:template ]	 MailChecker.tmpl.php
    [ writing:template ]	 mail_checker.tmpl.ex
    [ writing:template ]	 mailchecker.tmpl.clj
    [ writing:template ]	 index.tmpl.js
    [ compiling:template ]	 MailChecker.tmpl.py
    [ compiling:template ]	 mail_checker.tmpl.rb
    [ writing:template ]	 MailChecker.tmpl.php
    [ writing:template ]	 MailChecker.tmpl.js
    [ compiling:template ]	 lib.tmpl.rs
    [ writing:template ]	 mail_checker.tmpl.rb
    [ writing:template ]	 MailChecker.tmpl.py
    [ writing:template ]	 lib.tmpl.rs
    Done.
    sh: npm-run-all: command not found
    
    
    opened by jamesjjk 5
Owner
Francois-Guillaume Ribreau
🌟 #FullStackHacker CTO as a Service @image-charts @cloud-iam @hook0 @netwo-io @killbugtoday @mailpopin ...- Available for consulting
Francois-Guillaume Ribreau
This package adds support for verifying new email addresses: when a user updates its email address, it won't replace the old one until the new one is verified.

Laravel Verify New Email Laravel supports verifying email addresses out of the box. This package adds support for verifying new email addresses. When

Protone Media 261 Sep 15, 2022
Magento 2 Email Catcher or Email Logger Module.

Magento 2 Module Experius email catcher / - logger

Experius 49 Dec 16, 2021
SendPortal - Open-source self-hosted email marketing, subscriber and list management, email campaigns and more

SendPortal includes subscriber and list management, email campaigns, message tracking, reports and multiple workspaces/domains in a modern, flexible and scalable application.

Mettle 1.1k Sep 27, 2022
The classic email sending library for PHP

PHPMailer – A full-featured email creation and transfer class for PHP Features Probably the world's most popular code for sending email from PHP! Used

PHPMailer 18.7k Sep 30, 2022
PHP library for parsing plain text email content.

EmailReplyParser EmailReplyParser is a PHP library for parsing plain text email content, based on GitHub's email_reply_parser library written in Ruby.

William Durand 600 Sep 4, 2022
Send email across all platforms using one interface

Send email across all platforms using one interface. Table Of Content Requirements Installation Providers AmazonSES Mailgun Mailjet Mandrill Postmark

Omnimail 328 Sep 15, 2022
Small PHP library to valid email addresses using a number of methods.

Email Validator Small PHP library to valid email addresses using a number of methods. Features Validates email address Checks for example domains (e.g

James Jackson 154 Sep 27, 2022
Library for using online Email providers

Stampie Stampie have been moved to the "Flint" organization in order to get a better collaborative flow. Stampie is a simple API Wrapper for different

Henrik Bjørnskov 32 Oct 7, 2020
Library for using online Email providers

Stampie Stampie is a simple API Wrapper for different email providers such as Postmark and SendGrid. It is very easy to use and to integrate into your

Stampie 286 Sep 1, 2022
Mail sending module for Mezzio and Laminas MVC with support for file attachment and template email composition

This module provides an easy and flexible way to send emails from Mezzio and Laminas MVC applications (formerly known as Zend Expressive and Zend MVC). It allows you to pre-configure emails and transports, and then send those emails at runtime.

null 82 Jan 16, 2022
Omnisend: Ecommerce Email Marketing and SMS Platform

Omnisend Omnisend: Ecommerce Email Marketing and SMS Platform Version v1.x Support all PHP Version >=5.6 v2.x Support all PHP Version >=7.0 Installati

Hung Nguyen 3 Jan 6, 2022
Sending Email via Microsoft Exchange Web Services made Easy!

Send Mail via Exchange Web Services! Sending Email via Microsoft Exchange Web Services (EWS) made easy! Installation Install via Composer composer req

Raju Rayhan 19 Jul 19, 2022
Mailcoach is a self-hosted email list manager - in a modern jacket.

Welcome to Mailcoach Mailcoach is a self-hosted email list manager - in a modern jacket. It features: Subscribers and lists management Subscribe, doub

Spatie 3 Jan 31, 2022
An AngularJS / Laravel app - Keyword Based Email forwarder | read/write emails through IMAP

@MailTree Simple mail forwarder. Based on the specific email body/subject keywords forward mails to the list of predefined users. Install Imap Install

Dren Kajmakchi 4 Aug 21, 2018
Disposable email address validator for Laravel

Laravel Disposable Email Adds a validator to Laravel for checking whether a given email address isn't originating from disposable email services such

null 308 Sep 16, 2022
EMAIL, PASSWORD AND USERNAME GENERATOR

Email-Generator EMAIL, PASSWORD AND USERNAME GENERATOR Install on desktop : Install XAMPP Added environment variable system path => C:\xampp\php downl

Alex 2 Jan 8, 2022
📧 Handy email creation and transfer library for PHP with both text and MIME-compliant support.

?? Handy email creation and transfer library for PHP with both text and MIME-compliant support.

Nette Foundation 393 Sep 22, 2022
Fetch is a library for reading email and attachments, primarily using the POP and IMAP protocols

Fetch Fetch is a library for reading email and attachments, primarily using the POP and IMAP protocols. Installing N.b. A note on Ubuntu 14.04 (probab

Tedious Developments 499 Jul 30, 2022
Magento 2 SMTP - AVADA Email Marketing Integration

SMTP Extension for Magento 2 allows the owner offer a Magento 2 store to custom SMTP (Simple Mail Transfer Protocol) server which transmits email messages. Through the SMTP server, messages will be delivered directly and automatically to the chosen customers. It offers flexible configurations with 21 different SMTP servers such as Gmail, Hotmail, O2 Mail, Office365, Mail.com, Send In Blue, AOL Mail Orange, GMX, Outlook, Yahoo, Comcast, or Custom SMTP - for your own SMTP server, etc.

Yodo1117 1 Jan 25, 2022