Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/teamwork/mailaddress

Mail address parsing library for Go
https://github.com/teamwork/mailaddress

email go

Last synced: 3 days ago
JSON representation

Mail address parsing library for Go

Awesome Lists containing this project

README

        

[![Build Status](https://travis-ci.com/Teamwork/mailaddress.svg?branch=master)](https://travis-ci.com/Teamwork/mailaddress)
[![codecov](https://codecov.io/gh/Teamwork/mailaddress/branch/master/graph/badge.svg?token=n0k8YjbQOL)](https://codecov.io/gh/Teamwork/mailaddress)
[![GoDoc](https://godoc.org/github.com/Teamwork/mailaddress?status.svg)](https://godoc.org/github.com/Teamwork/mailaddress)
[![Go Report Card](https://goreportcard.com/badge/github.com/Teamwork/mailaddress)](https://goreportcard.com/report/github.com/Teamwork/mailaddress)

The mailaddress package parses email addresses.

It's an alternative to `net/mail`; significant differences include:

- Better errors.
- When parsing a list it will continue to the next address on an error; this is
especially useful when providing feedback to users.
- Some useful utility functions.

Basic example:

addr, err := mailaddress.Parse(`Martin `)

addrs, haveErr := mailaddress.ParseLint(`[email protected], [email protected]`)
if haveErr {
fmt.Println(addrs.Errors())
}

See godoc for more docs.