All Projects → trumail → Trumail

trumail / Trumail

Licence: bsd-3-clause
✉️ ✅ A Fast and Free Email Verification API written in Go

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Trumail

NeverBounceAPI-PHP
This package provides convenient methods to integrate the NeverBounce API into your project.
Stars: ✭ 22 (-97.65%)
Mutual labels:  validation, email, verification
Email Verifier
✅ A Go library for email verification without sending any emails.
Stars: ✭ 162 (-82.71%)
Mutual labels:  validation, email, verification
Mailcare
[MIRRORING REPOSITORY] See https://gitlab.com/mailcare/mailcare. MailCare is an open source disposable email address services. Accessible via web browser or API to protect your privacy right now.
Stars: ✭ 136 (-85.49%)
Mutual labels:  api, email
Mailjet Apiv3 Nodejs
[API v3] Official Mailjet API v3 NodeJS wrapper
Stars: ✭ 137 (-85.38%)
Mutual labels:  api, email
checker
Golang parameter validation, which can replace go-playground/validator, includes ncluding Cross Field, Map, Slice and Array diving, provides readable,flexible, configurable validation.
Stars: ✭ 62 (-93.38%)
Mutual labels:  validation, verification
Restless
Express.js api, type safe validations and more
Stars: ✭ 32 (-96.58%)
Mutual labels:  api, validation
Rest Hapi
🚀 A RESTful API generator for Node.js
Stars: ✭ 1,102 (+17.61%)
Mutual labels:  api, validation
email-checker
Provides email verification on the go.
Stars: ✭ 116 (-87.62%)
Mutual labels:  email, verification
Express Mongodb Rest Api Boilerplate
A boilerplate for Node.js apps / Rest API / Authentication from scratch - express, mongodb (mongoose).
Stars: ✭ 153 (-83.67%)
Mutual labels:  api, verification
Express Graphql Mongodb Boilerplate
A boilerplate for Node.js apps / GraphQL-API / Authentication from scratch - express, graphql - (graphql compose), mongodb (mongoose).
Stars: ✭ 288 (-69.26%)
Mutual labels:  api, verification
Email inquire
Validate email for common typos and one-time email providers
Stars: ✭ 257 (-72.57%)
Mutual labels:  validation, email
Annon.api
Configurable API gateway that acts as a reverse proxy with a plugin system.
Stars: ✭ 306 (-67.34%)
Mutual labels:  api, validation
Openapi3 Validator
Validator for OpenAPI v3 specs
Stars: ✭ 11 (-98.83%)
Mutual labels:  api, validation
Mail4delphi
Mail4Delphi uses the Indy component to send the email.
Stars: ✭ 60 (-93.6%)
Mutual labels:  api, email
Ismailfine
A simple (but correct) library for validating email addresses. Supports mail addresses as defined in rfc5322 as well as the new Internationalized Mail Address standards (rfc653x). Based on https://github.com/jstedfast/EmailValidation
Stars: ✭ 9 (-99.04%)
Mutual labels:  validation, email
Validate
⚔ Go package for data validation and filtering. support Map, Struct, Form data. Go通用的数据验证与过滤库,使用简单,内置大部分常用验证、过滤器,支持自定义验证器、自定义消息、字段翻译。
Stars: ✭ 378 (-59.66%)
Mutual labels:  validation, verification
Dredd
Language-agnostic HTTP API Testing Tool
Stars: ✭ 3,770 (+302.35%)
Mutual labels:  api, validation
Upash
🔒Unified API for password hashing algorithms
Stars: ✭ 484 (-48.35%)
Mutual labels:  api, verification
Beautymail
Send beautiful HTML emails with Laravel
Stars: ✭ 923 (-1.49%)
Mutual labels:  email
Lambda Api
Lightweight web framework for your serverless applications
Stars: ✭ 929 (-0.85%)
Mutual labels:  api

Trumail

CircleCI GoDoc

Trumail is a free and open source email validation/verification system. It is available in three forms, the Golang client library verifier for use in your own Go projects, a public API endpoint (more info: https://trumail.io), and a public Docker image on DockerHub (see: https://hub.docker.com/r/sdwolfe32/trumail/).

NOTE: While we do offer a managed, enterprise level service to paying customers, it is highly recommended that you host the service yourself either using a Docker image or by forking and serving this project on your own instance. Please keep in mind, self-hosting Trumail requires bidirectional communication on port 25 which most residential ISPs restrict - AWS and Digitalocean both permit this sort of communication.

Using the API (public or self-hosted)

Using the API is very simple. All that's needed to validate an address is to send a GET request using the below URL with one of our three supported formats (json/jsonp(with "callback" (all lowercase) queryparam)/xml).

https://api.trumail.io/v2/lookups/{format}?email={email}&token={token}

Using the library

package main

import (
	"log"

	trumail "github.com/sdwolfe32/trumail/verifier"
)

func main() {
  v := trumail.NewVerifier("YOUR_HOSTNAME.COM", "[email protected]")
  
  // Validate a single address
  log.Println(v.Verify("[email protected]"))
}

Running with Go

go get -d github.com/sdwolfe32/trumail/...
go install github.com/sdwolfe32/trumail
trumail

Running with Docker

docker run -p 8080:8080 -e [email protected] sdwolfe32/trumail

How it Works

Verifying the deliverability of an email address isn't a very complicated process. In fact, the process Trumail takes to verify an address is really only half that of sending a standard email transmission and is outlined below...

First a TCP connection is formed with the MX server on port 25.

HELO my-domain.com              // We identify ourselves as my-domain.com (set via environment variable)
MAIL FROM: [email protected]     // Set the FROM address being our own
RCPT TO: [email protected] // Set the recipient and receive a (200, 500, etc..) from the server
QUIT                            // Cancel the transaction, we have all the info we need

As you can see we first form a tcp connection with the mail server on port 25. We then identify ourselves as example.com and set a reply-to email of [email protected] (both these are configured via the SOURCE_ADDR environment variable). The last, and obviously most important step in this process is the RCPT command. This is where, based on the response from the mail server, we are able to conclude the deliverability of a given email address. A 200 implies a valid inbox and anything else implies either an error with our connection to the mail server, or a problem with the address requested.

The BSD 3-clause License

Copyright (c) 2018, Steven Wolfe. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  • Neither the name of Trumail nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].