Skip to content

EnrowAPI/email-verifier-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Email Verifier - Go Library

Go Reference License: MIT GitHub stars Last commit

Verify email addresses in real time. Check deliverability, detect disposable and catch-all mailboxes, and clean your lists before sending. Integrate email verification into your sales pipeline, CRM sync, or outreach workflow.

Powered by Enrow -- each verification costs just 0.25 credits.

Installation

go get github.com/EnrowAPI/email-verifier-go

Requires Go 1.21+. Zero dependencies.

Simple Usage

package main

import (
	"fmt"
	"log"

	emailverifier "github.com/EnrowAPI/email-verifier-go"
)

func main() {
	verification, err := emailverifier.VerifyEmail("your_api_key", "tcook@apple.com", "")
	if err != nil {
		log.Fatal(err)
	}

	result, err := emailverifier.GetVerificationResult("your_api_key", verification.ID)
	if err != nil {
		log.Fatal(err)
	}

	fmt.Println(result.Email)         // tcook@apple.com
	fmt.Println(result.Qualification) // valid
}

VerifyEmail returns a verification ID. The check runs asynchronously -- call GetVerificationResult to retrieve the result once it is ready. You can also pass a webhook URL to get notified automatically.

Webhook notifications

Pass a webhook URL as the third argument to receive results automatically when verification completes.

verification, err := emailverifier.VerifyEmail("your_api_key", "tcook@apple.com", "https://example.com/webhook")

Bulk verification

batch, err := emailverifier.VerifyEmails("your_api_key", []string{
	"tcook@apple.com",
	"satya@microsoft.com",
	"jensen@nvidia.com",
}, "")
if err != nil {
	log.Fatal(err)
}

// batch.BatchID, batch.Total, batch.Status

results, err := emailverifier.GetVerificationResults("your_api_key", batch.BatchID)
if err != nil {
	log.Fatal(err)
}
// results.Results -- slice of VerificationResult

Up to 5,000 verifications per batch. Pass a webhook URL to get notified when the batch completes.

Error handling

_, err := emailverifier.VerifyEmail("bad_key", "test@test.com", "")
if err != nil {
	fmt.Println(err)
	// Common errors:
	// - "Invalid or missing API key" (401)
	// - "Your credit balance is insufficient." (402)
	// - "Rate limit exceeded" (429)
}

Getting an API key

Register at app.enrow.io to get your API key. You get 50 free credits (= 200 verifications) with no credit card required.

Paid plans start at $17/mo for 1,000 emails up to $497/mo for 100,000 emails. See pricing.

Documentation

License

MIT -- see LICENSE for details.

About

Verify email addresses for deliverability with catch-all verification — Go library powered by Enrow

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages