@emailcheck/disposable-email-providers
v1.0.0
Published
A list of Disposable email providers in JSON format
Readme
Disposable Email Providers List
A comprehensive, curated collection of disposable and temporary email provider domains for spam prevention, privacy protection, and email validation.
📋 Overview
This repository maintains an extensive, regularly updated list of disposable/temporary email provider domains. The data is aggregated from multiple reputable sources and carefully deduplicated to provide the most comprehensive collection available for:
- Email Validation: Block disposable emails during user registration
- Spam Prevention: Filter out temporary email addresses
- Compliance: Meet anti-fraud and marketing requirements
- Development: Test email functionality without using real addresses
📊 Statistics
- Total Domains: 259,095+ unique disposable email domains
- JSON Format: 169,981 structured entries
- Text Format: Simple domain list for easy integration
- Regular Updates: Frequently maintained with new providers
📁 Available Formats
JSON Format
disposable-email-providers.json
# Size: ~3.3MB
# Entries: 169,981
# Format: Array of domain stringsUsage Example:
const fs = require('fs');
const disposableDomains = JSON.parse(fs.readFileSync('disposable-email-providers.json', 'utf8'));
function isDisposable(email) {
const domain = email.split('@')[1].toLowerCase();
return disposableDomains.includes(domain);
}Usage Example:
# Quick check using grep
grep -q "domain.com" list.txt && echo "Disposable" || echo "Valid"🚀 Quick Start
JavaScript/Node.js
// Using JSON format
const fs = require('fs');
const disposableEmails = JSON.parse(fs.readFileSync('disposable-email-providers.json', 'utf8'));
function validateEmail(email) {
const domain = email.split('@')[1]?.toLowerCase();
return !disposableEmails.includes(domain);
}
// Example
console.log(validateEmail('[email protected]')); // true
console.log(validateEmail('[email protected]')); // falsePython
import json
# Load disposable domains
with open('disposable-email-providers.json', 'r') as f:
disposable_domains = set(json.load(f))
def is_valid_email(email):
try:
domain = email.split('@')[1].lower()
return domain not in disposable_domains
except IndexError:
return False
# Example
print(is_valid_email('[email protected]')) # True
print(is_valid_email('[email protected]')) # FalsePHP
<?php
// Load disposable domains
$disposableDomains = json_decode(file_get_contents('disposable-email-providers.json'), true);
function isDisposableEmail($email) {
$domain = strtolower(substr(strrchr($email, '@'), 1));
return in_array($domain, $disposableDomains);
}
// Example
var_dump(isDisposableEmail('[email protected]')); // bool(false)
var_dump(isDisposableEmail('[email protected]')); // bool(true)🔄 Integration Examples
Using EMAIL-CHECKER.APP Email Validator (Recommended)
For a complete email validation solution, consider using email-validator-js, which includes this disposable email list along with comprehensive validation:
npm install @emailcheck/email-validator-jsconst { EmailValidator } = require('@emailcheck/email-validator-js');
const validator = new EmailValidator();
async function validateEmail(email) {
const result = await validator.validate(email);
return {
isValid: result.isValid,
isDisposable: result.isDisposable,
score: result.score,
details: result
};
}
// Example usage
const result = await validateEmail('[email protected]');
console.log(result); // { isValid: true, isDisposable: false, score: 95, ... }Cloud API Service
For production applications, use the managed email validation service at email-check.app:
const response = await fetch('https://api.email-check.app/validate', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({ email: '[email protected]' })
});
const result = await response.json();Express.js Middleware (Manual Implementation)
const express = require('express');
const disposableDomains = require('./disposable-email-providers.json');
const app = express();
// Middleware to block disposable emails
app.use((req, res, next) => {
if (req.body.email) {
const domain = req.body.email.split('@')[1]?.toLowerCase();
if (disposableDomains.includes(domain)) {
return res.status(400).json({ error: 'Disposable email addresses are not allowed' });
}
}
next();
});
app.post('/register', (req, res) => {
// Registration logic here
res.json({ success: true });
});Laravel Validation Rule
<?php
namespace App\Rules;
use Closure;
use Illuminate\Contracts\Validation\ValidationRule;
class NotDisposableEmail implements ValidationRule
{
public function validate(string $attribute, mixed $value, Closure $fail): void
{
$disposableDomains = json_decode(file_get_contents(storage_path('app/disposable-email-providers.json')), true);
$domain = strtolower(substr(strrchr($value, '@'), 1));
if (in_array($domain, $disposableDomains)) {
$fail('Disposable email addresses are not allowed.');
}
}
}🛠️ Maintenance
The list is regularly updated through automated processes:
- Deduplication: Merge and remove duplicates from multiple sources
- Validation: Verify domain accessibility and functionality
- Sorting: Maintain organized, searchable lists
- Regular Updates: Weekly/monthly updates with new providers
📝 License
This project is licensed under the MIT License - see the LICENSE.md file for details.
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
How to Contribute
- Fork this repository
- Create a feature branch (
git checkout -b feature/new-providers) - Add your changes to the json file
- Commit your changes (
git commit -m 'Add new disposable email providers') - Push to the branch (
git push origin feature/new-providers) - Open a Pull Request
⚠️ Important Notes
- Regular Updates: Disposable email providers appear frequently. Regular updates are recommended
- False Positives: Some legitimate services might be flagged. Consider implementing an allowlist
- Performance: For high-traffic applications, consider loading the data into memory or using a database
- Legal Compliance: Ensure compliance with local regulations regarding email validation
🔍 Related Projects
Cloud Solutions
- email-validator-js - Complete email validation library with disposable email detection, syntax validation, and deliverability checks
- email-check.app - Managed cloud API for email validation with high performance and reliability
📞 Support
For questions, issues, or suggestions:
- 🐛 Report Issues
- 💬 Discussions
- 📧 Maintainer: EMAIL-CHECK.APP
- 🌐 Email Validator Service - For production email validation needs
⭐ If this project helps you, consider giving it a star!
