1. Products
  2.   Email
  3.   GO
  4.   Trumail

Open Source Go Library to Verify Email Messages

A Fast and Free Email Verification API written in Go.

Trumail is open-source email verification & validation system. Trumail is a fast email address verification API written purely in Go. The aim of building API was to provide developers with a simple solution to manage bounced emails. Using the API you can prevent bounced emails and low-quality users. If you are a developer writing a new application to make sure that a valid user can subscribe to your application, trumail can help you verify it.

Using the API is pretty simple. The API provides an email verification endpoint. In order to verify the email address, you need to send and GET request to the main lookup endpoint. By using the API open-source code, you can host it in your own environment and use it as per your needs.

Trumail is a powerful tool that leverages various techniques to verify the validity of an email address. It checks for syntax errors, performs DNS lookups, and even pings the email server to ensure that the address exists and is accepting emails. With Trumail, you can confidently verify email addresses in real-time, helping you reduce bounce rates, improve deliverability, and enhance your overall email marketing strategy.

Previous Next

Getting Started with Trumail

The recommended way to add trumail into your project is by using GitHub. Please use the following command for a smooth installation.

Install Trumail via GitHub

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

Validate & Verify Email Address via Free Go API

Verifying email addresses with the Trumail API is pretty straiht forward. In order to verify the email adress, you need to send an HTTP GET request to the following URL.

Verify Email Address via Trumail API


The email verification is not a very complicated process. Firstly and TCP conneciton is formed with the server on port 25 then identify the server name and set and reply-to email. Lastly, by using RCPT command the email address is verified. Here is another example for verifying an email address inside Go applications.

How to Verify Email Address using Go API?

gimport requests

def verify_email(email):
    url = f"https://trumail.io/json/{email}"
    response = requests.get(url)
    data = response.json()
    if data["valid"]:
        print("Email address is valid.")
        print("Email address is invalid.")
        if "error" in data:
            print(f"Error: {data['error']}")


Advanced Email Verification in Go Apps

The Open Source Trumail library offers several advanced features that you can leverage to enhance your email verification process. For example, you can enable additional checks such as MX validation, which verifies that the mail exchange (MX) records for the domain are properly configured. Additionally, Trumail supports bulk email verification, allowing you to verify multiple email addresses simultaneously, making it ideal for large-scale operations.