Skip to content

provides email address validation, sanitization, and disposable email detection

License

Notifications You must be signed in to change notification settings

eser/sanitizer-svc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Email Sanitizer Service

A lightweight HTTP service that provides email address validation, sanitization, and disposable email detection.

Features

  • Email validation using regex pattern
  • Email sanitization (lowercase, whitespace removal, plus addressing removal)
  • Disposable email domain detection
  • Simple REST API interface

Getting Started

Prerequisites

  • Go 1.x or higher
  • A disposable email blocklist file (provided as disposable_email_blocklist.conf)

Installation

git clone https://github.com/eser/sanitizer-svc.git
cd sanitizer-svc
go build

Usage

  1. Start the server:
./sanitizer-svc

The server will start on port 8080.

API Endpoint

GET /sanitize

Validates, sanitizes, and checks if an email address is from a disposable domain.

Query Parameters:

  • email (required): The email address to process

Response:

{
    "isValid": true,
    "sanitized": "[email protected]",
    "isDisposable": false
}

Example Usage:

curl "http://localhost:8080/[email protected]"

Sanitization Rules

The service applies the following sanitization rules:

License

Apache 2.0

Thanks

Thanks to disposable-email-domains project for providing the blocklist and making it available under Public Domain.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

provides email address validation, sanitization, and disposable email detection

Topics

Resources

License

Stars

Watchers

Forks

Languages