Giter Site home page Giter Site logo

mail-bouncer_wa's Introduction

mail-bouncer

Email validation service with RESTish API

Go Report Card

Goal

Often it's not enough to just validate a format of an email. Even if a format is Ok, you may fail to send a message to it. You can have an invalid domain, without MX record, a user can be over quota. Or already deleted.

And mail-bouncer helps you to find out about it before you send a message.

Usage

Get it with:

go get github.com/olegfedoseev/mail-bouncer

Start it with:

mail-bouncer --listen=<listen> --host=<host> --from=<from>

You have to specify valid hostname for "host" (see HELO command in SMTP) and valid email for "from" (see MAIL command in SMTP)

Or using Docker:

docker run -d -p 80 olegfedoseev/mail-bouncer

Then all you need is simple GET:

> curl -i ":8080/[email protected]"                                                                                                   HTTP/1.1 200 OK
Date: Fri, 02 Sep 2016 05:02:46 GMT
Content-Length: 241
Content-Type: text/plain; charset=utf-8

{
	"email":"[email protected]",
	"is_valid":false,
	"description":"MX server is unreachable",
	"error":"can't connect to email.com: 421 mail.com (mxgmxus004) Nemesis ESMTP Service not available\nRequested action aborted: local error in processing"
}

> curl -i "http://127.0.0.1:8080/[email protected]"
HTTP/1.1 200 OK

{
	"email":"[email protected]",
	"is_valid":true,
	"description":"Ok",
	"error":""
}

Or with callback:

> curl -i -XPOST "http://127.0.0.1:8080/[email protected]&callback=$URL"
HTTP/1.1 201 Created

And you will get POST to $URL with JSON data, ex.:

{
	"email": "[email protected]",
	"is_valid": false,
	"error": "RCPT failed for [email protected]: 554 5.7.1 Helo command rejected"
}

mail-bouncer_wa's People

Contributors

olegfedoseev avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.