This repository contains a list of disposable/temporary email domains in various formats for easy integration into different programming languages and frameworks.
- TypeScript/JavaScript:
temporaryMailList.ts
andtemporaryMailList.js
- Python:
temporary_mail_list.py
- Go:
temporary_mail_list.go
- JSON:
temporary_mail_list.json
- YAML:
temporary_mail_list.yaml
- Config:
temporary_mail_list.conf
import { disposableEmailDomains } from './temporaryMailList';
function isDisposableEmail(email: string): boolean {
const domain = email.split('@')[1];
return disposableEmailDomains.includes(domain);
}
from temporary_mail_list import disposable_email_domains
def is_disposable_email(email):
domain = email.split('@')[1]
return domain in disposable_email_domains
package main
import "strings"
func isDisposableEmail(email string) bool {
parts := strings.Split(email, "@")
if len(parts) != 2 {
return false
}
domain := parts[1]
for _, disposableDomain := range DisposableEmailDomains {
if domain == disposableDomain {
return true
}
}
return false
}
const disposableEmailDomains = require('./temporary_mail_list.json').disposableEmailDomains;
function isDisposableEmail(email) {
const domain = email.split('@')[1];
return disposableEmailDomains.includes(domain);
}
import yaml
with open('temporary_mail_list.yaml', 'r') as file:
data = yaml.safe_load(file)
disposable_email_domains = data['disposableEmailDomains']
def is_disposable_email(email):
domain = email.split('@')[1]
return domain in disposable_email_domains
Feel free to use the format that best suits your project's needs.
via jannatkhandev